我有一个超过300名议员的数据集,他们问了2887个问题。我将问题的性质分为地方,国家或两者。现在我想用总问题作为因变量对它们进行回归。我的虚拟变量是本地和国家。但是当我对它们进行回归时,它给出了2887个观测值,但我的总数为307.我怎么能用307的观测值对它们进行回归?谁能帮助我做到这一点?我正在使用负二项回归模型。
Here is my data's sample section:
ID QuesCategory QuesFocus
28 Standard Question Local
28 Standard Question Regional/Divisional
28 Standard Question Combination
28 Standard Question Combination
28 Standard Question Combination
29 Standard Question Regional/Divisional
29 Standard Question Combination
29 Standard Question Regional/Divisional
29 Standard Question Regional/Divisional
29 Standard Question Regional/Divisional
30 Standard Question Local
36 Standard Question Local
36 Standard Question National
36 Helpful Question National
36 Standard Question Combination
36 Standard Question Local
40 Standard Question National
40 Standard Question Combination
40 Standard Question Combination
40 Standard Question Regional/Divisional
40 Standard Question Combination
40 Standard Question Regional/Divisional
我有另一个文件,其中包含个人ID及其个人信息所提出的问题总数,如下所示:
ID TotalQues Region Gender
28 15 Rangpur Male
29 5 Rangpur Male
30 1 Rangpur Male
36 5 Rajshahi Male
40 26 Rajshahi Male
42 17 Rajshahi Male
49 13 Rajshahi Male
53 7 Rajshahi Male
66 18 Rajshahi Male
71 21 Rajshahi Male
72 17 Rajshahi Male
74 4 Khulna Male
75 9 Khulna Male
76 26 Khulna Male
77 23 Khulna Male
78 19 Khulna Male
我想以当地的焦点回归总问题,但我不知道我能做些什么。我是否将按ID分配的本地焦点问题合并到总问题文件中。如果我这样做,问题仍然存在,它会给出正确的回归,因为ID(成员)的本地问题的份额几乎是一半,如果不是,我应该如何关联它。
根据您的信息,总ID为357,但总问题为2887.