R 如何使用响应二项变量为重复测量运行GEE回归?
我正在尝试对广义估计方程(GEE)进行logisting回归。我使用Ideo_Dich(由0和1组成)作为我的响应变量,包括:R 如何使用响应二项变量为重复测量运行GEE回归?,r,regression,gee,R,Regression,Gee,我正在尝试对广义估计方程(GEE)进行logisting回归。我使用Ideo_Dich(由0和1组成)作为我的响应变量,包括: sample2$Ideo_Dich <- ordered(factor(sample2$Ideo_Dich)) library (multgee) nomLORgee(Ideo_Dich~ square+round, data=sample2, id= Politician_ID,repeated
sample2$Ideo_Dich <- ordered(factor(sample2$Ideo_Dich))
library (multgee)
nomLORgee(Ideo_Dich~ square+round, data=sample2,
id= Politician_ID,repeated=Country_ID)
我的示例数据集如下所示:
Politician_ID Country_ID Ideo_Dich round square
<int> <int> <ord> <dbl> <dbl>
1 3917 1 0 0.374 -0.486
2 3921 1 0 0.682 -0.580
3 3931 1 0 0.463 -0.801
4 3932 1 0 0.00806 -0.296
5 3935 1 0 -0.250 -0.485
6 3936 1 0 0.814 -0.684
7 3937 1 0 -0.0876 -0.421
8 3942 1 0 0.630 -0.738
9 3944 1 0 0.0779 -0.499
10 3945 1 0 0.549 -1.30
political\u ID Country\u ID Ideo\u dic圆形广场
1 3917 1 0 0.374 -0.486
2 3921 1 0 0.682 -0.580
3 3931 1 0 0.463 -0.801
4 3932 1 0 0.00806 -0.296
5 3935 1 0 -0.250 -0.485
6 3936 1 0 0.814 -0.684
7 3937 1 0 -0.0876 -0.421
8 3942 1 0 0.630 -0.738
9 3944 1 0 0.0779 -0.499
10 3945 1 0 0.549 -1.30
由于我是回归方法学的新手,我想在这方面得到一些指导。GEE是人口平均模型。您只需要在模型中指定一个ID。如果只能选择政客或县作为ID和关联结构。
样本2$Ideo_Dich由于该软件包似乎是针对多项式响应变量的,我猜这个错误告诉您它对二项式(即仅2类)响应变量不起作用。那么我猜答案应该是针对重复测量(国家ID)运行GEE回归的软件包?
Politician_ID Country_ID Ideo_Dich round square
<int> <int> <ord> <dbl> <dbl>
1 3917 1 0 0.374 -0.486
2 3921 1 0 0.682 -0.580
3 3931 1 0 0.463 -0.801
4 3932 1 0 0.00806 -0.296
5 3935 1 0 -0.250 -0.485
6 3936 1 0 0.814 -0.684
7 3937 1 0 -0.0876 -0.421
8 3942 1 0 0.630 -0.738
9 3944 1 0 0.0779 -0.499
10 3945 1 0 0.549 -1.30