2
$\begingroup$

I am working on research in R using a dataset from the German Comparative Candidate Survey (a survey of political candidates during election campaigns). I would like to run a regression with a dichotomous dependent variable (if an MP should follow the voters position on a certain issue or the party position) and mostly ordinal independent variables - e.g. immigrants should be required to adapt to the customs of the country (strongly agree, agree, neither, disagree, strongly disagree) or politics should abstain from intervening in the economy (strongly agree, agree, neither, disagree, strongly disagree) etc. Last but not least, I have a few standard demographic independent variables - gender, age & subjective size of hometown. Nevertheless, I'm not sure which type of regression to use. My intuition tells me that the logistic regression fits best. Am I correct? Note: I have not yet done the data cleansing - variable recoding, removing missings etc.

This is how the head of the dataset looks like:

        t0      t1 t2   t3 t4 t5     t6   t7                                       t8          t9 a1   a2
1 3,20E+12 Germany  5 2009 -1 -1 999999 mail Question not asked or data not available Q not asked  6 2007
2 3,20E+12 Germany  8 2009 -1 -1 999999 mail Question not asked or data not available Q not asked  1 1970
3 3,20E+12 Germany  9 2009 -1 -1 999999 mail Question not asked or data not available Q not asked  4 1974
4 3,20E+12 Germany 10 2009 -1 -1 999999 mail Question not asked or data not available Q not asked  2 1982
  a3a a3b1 a3b2 a3b3        a4a1        a4a2        a4a3        a4a4        a4a5        a4a6        a4b1
1  no   -1   -1   -1 Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked
2  no   -1   -1   -1 Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked
3  no   -1   -1   -1 Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked
4  no   -1   -1   -1 Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked
         a4b2        a4b3        a4b4        a4b5        a4b6 a5a a5b a6a a6b a7a1 a7a2 a7a3 a7a4 a7a5
1 Q not asked Q not asked Q not asked Q not asked Q not asked  no  97  no  97  yes   no  yes   no   no
2 Q not asked Q not asked Q not asked Q not asked Q not asked  no  97  no  97  yes   no  yes  yes   no
3 Q not asked Q not asked Q not asked Q not asked Q not asked  no  97  no  97   no   no   no  yes   no
4 Q not asked Q not asked Q not asked Q not asked Q not asked  no  97  no  97  yes   no   no   no   no
  a7a6 a7a7 a7a8        a7a9 a7b1 a7b2 a7b3 a7b4 a7b5 a7b6 a7b7 a7b8 a7b9 a8a a8b a8c a9a a9b a9c a9d a9e
1   no   no   no Q not asked    1  997    4  997  997  997  997  997   -1   0   0   0   0  -1   0   0   0
2   no  yes   no Q not asked  999  997  999  999  997  997  999  997   -1  12  10   0  99  -1  99  99  12
3  yes   no  yes Q not asked  997  997  997    2  997    4  997    5   -1  20  99  99  99  -1  99  99  20
4  yes  yes   no Q not asked    2  997  997  997  997    4    4  997   -1   0   0   0   0  -1   0   0   0
  a9f a9g a9h      a10a a10b     a11a1     a11a2     a11a3     a11a4 a11b1 a11b2 a11b3 a11b4 a12
1   0   0   0 no answer   99 no answer no answer no answer no answer    -1    -1    -1    -1   4
2  99  99  99 no answer   99 no answer no answer no answer no answer    -1    -1    -1    -1   2
3  99  99  99 no answer   99 no answer no answer no answer no answer    -1    -1    -1    -1  10
4   0   0   0 no answer   99 no answer no answer no answer no answer    -1    -1    -1    -1   5
          b1a       b1b       b1c          b2         b3a         b3b  b4      b5a1      b5a2      b5a3
1 Q not asked no answer no answer Q not asked Q not asked Q not asked 320 no answer no answer no answer
2 Q not asked no answer no answer Q not asked Q not asked Q not asked 999 no answer no answer no answer
3 Q not asked no answer no answer Q not asked Q not asked Q not asked  80 no answer no answer no answer
4 Q not asked no answer no answer Q not asked Q not asked Q not asked  60 no answer no answer no answer
       b5a4      b5a5      b5a6      b5a7      b5a8      b5a9     b5a10      b5b1      b5b2      b5b3
1 no answer no answer no answer no answer no answer no answer no answer no answer no answer no answer
2 no answer no answer no answer no answer no answer no answer no answer no answer no answer no answer
3 no answer no answer no answer no answer no answer no answer no answer no answer no answer no answer
4 no answer no answer no answer no answer no answer no answer no answer no answer no answer no answer
       b5b4      b5b5      b5b6      b5b7 b6a1 b6a2 b6a3 b6a4 b6a5 b6a6 b6a7           b6b1
1 no answer no answer no answer no answer   no   no   no   no   no   no  yes not applicable
2 no answer no answer no answer no answer   no   no   no   no   no   no   no not applicable
3 no answer no answer no answer no answer   no   no   no   no   no   no   no not applicable
4 no answer no answer no answer no answer   no  yes   no  yes   no   no   no not applicable
              b6b2           b6b3           b6b4           b6b5           b6b6               b6b7
1   not applicable not applicable not applicable not applicable not applicable not very important
2   not applicable not applicable not applicable not applicable not applicable     not applicable
3   not applicable not applicable not applicable not applicable not applicable     not applicable
4 fairly important not applicable very important not applicable not applicable     not applicable
         b6c1        b6c2        b6c3        b6c4        b6c5        b6c6        b6c7        b7       b8a
1 Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked         1        no
2 Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked        99 no answer
3 Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked 0,6666667       yes
4 Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked Q not asked         1        no
                                                                                                                                                                                                                                                              b8b
1 9996 no (further) issue mentioned                                                                                                                                                                                                                              
2 9996 no (further) issue mentioned                                                                                                                                                                                                                              
3 Regenerative Energie                                                                                                                                                                                                                                           
4 9996 no (further) issue mentioned                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                              b8c
1 -1 Q not asked                                                                                                                                                                                                                                                 
2 -1 Q not asked                                                                                                                                                                                                                                                 
3 -1 Q not asked                                                                                                                                                                                                                                                 
4 -1 Q not asked                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                              b8d
1 -1 Q not asked                                                                                                                                                                                                                                                 
2 -1 Q not asked                                                                                                                                                                                                                                                 
3 -1 Q not asked                                                                                                                                                                                                                                                 
4 -1 Q not asked                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                              b8e
1 -1 Q not asked                                                                                                                                                                                                                                                 
2 -1 Q not asked                                                                                                                                                                                                                                                 
3 -1 Q not asked                                                                                                                                                                                                                                                 
4 -1 Q not asked                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                              b8f
1 -1 Q not asked                                                                                                                                                                                                                                                 
2 -1 Q not asked                                                                                                                                                                                                                                                 
3 -1 Q not asked                                                                                                                                                                                                                                                 
4 -1 Q not asked                                                                                                                                                                                                                                                 
  b9a b9b b9c b9d b9e b9f b9g      b10a      b10b      b10c      b10d      b10e b11a1 b11a2 b11b
1  no yes yes yes  no yes  no no answer no answer no answer no answer no answer     3     1   -1
2  no  no  no  no  no  no  no no answer no answer no answer no answer no answer     0     0   -1
3  no  no  no  no  no yes  no no answer no answer no answer no answer no answer     0     0   -1
4  no  no yes  no  no  no  no no answer no answer no answer no answer no answer     0     0   -1
        b11c1 b11c2 b11d      b12a
1 Q not asked    -1   -1        no
2 Q not asked    -1   -1 no answer
3 Q not asked    -1   -1        no
4 Q not asked    -1   -1        no
                                                                                                                                                                                                                                                             b12b
1                                                                                                                                                                                                                                                                
2                                                                                                                                                                                                                                                                
3                                                                                                                                                                                                                                                                
4                                                                                                                                                                                                                                                                
    b13 b14a b14b b14c b15       b16
1 13000  100    0    0   9 no answer
2     0    0    0    0   9 no answer
3   500    0    0  100   9 no answer
4  1000    0    0  100   9 no answer
                                                                                                                                                                                                                                                              c1a
1 Krieg                                                                                                                                                                                                                                                          
2 soziale Gerechtigkeit                                                                                                                                                                                                                                          
3 Finanzkrise                                                                                                                                                                                                                                                    
4 Demographie                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                              c1b
1 soziale Ungerechtigkeit                                                                                                                                                                                                                                        
2 Friedenpolitik                                                                                                                                                                                                                                                 
3 Bildung                                                                                                                                                                                                                                                        
4 Wirtschaftskrise                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                              c1c
1 Krieg                                                                                                                                                                                                                                                          
2 Umweltpol.                                                                                                                                                                                                                                                     
3 Natur u. Umwelt                                                                                                                                                                                                                                                
4 Umweltschutz                                                                                                                                                                                                                                                   
             c2a               c2b               c2c               c2d               c2e
1       disagree strongly disagree    strongly agree strongly disagree    strongly agree
2       disagree          disagree strongly disagree strongly disagree           neither
3          agree             agree           neither strongly disagree strongly disagree
4 strongly agree           neither    strongly agree           neither strongly disagree
                c2f               c2g               c2h               c2i       c2j               c2k
1 strongly disagree    strongly agree    strongly agree    strongly agree no answer    strongly agree
2           neither    strongly agree             agree strongly disagree     agree strongly disagree
3           neither    strongly agree          disagree           neither     agree             agree
4          disagree strongly disagree strongly disagree strongly disagree     agree strongly disagree
                c2l               c2m       c2n c3 c3a           c4 c5                   c6          c7
1 strongly disagree    strongly agree no answer  0  -1 a good thing 10 not at all satisfied Q not asked
2          disagree strongly disagree  disagree  3  -1 a good thing  7   not very satisfied Q not asked
3             agree    strongly agree  disagree  7  -1 a good thing  4   not very satisfied Q not asked
4    strongly agree    strongly agree   neither  5  -1 a good thing 10     fairly satisfied Q not asked
  c7a c7b c7c c7d c7e c7f c7g c7h c7i c7k                 d1            d2 d3a d3b d3c d3d       d3e d3f
1  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 not very satisfied not very well   3  -1   5   1  2nd rank   4
2  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1   fairly satisfied   fairly well   9  -1   1   9 no answer   1
3  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1 not very satisfied   fairly well   9  -1   1   2 no answer   3
4  -1  -1  -1  -1  -1  -1  -1  -1  -1  -1     very satisfied     very well   4  -1   2   3  5th rank   1
             d4a         d4b         d4c            d5a               d5b       d5c            d5d
1      no answer   no answer   no answer      no answer         no answer no answer      no answer
2  voter opinion own opinion own opinion          agree             agree   neither          agree
3 party position own opinion own opinion          agree             agree  disagree       disagree
4  voter opinion own opinion own opinion strongly agree strongly disagree     agree strongly agree
                d5e       d5f               d5g               d5h               d6a               d6b
1         no answer no answer strongly disagree    strongly agree    strongly agree strongly disagree
2             agree     agree    strongly agree             agree             agree          disagree
3           neither  disagree             agree             agree             agree           neither
4 strongly disagree  disagree    strongly agree strongly disagree strongly disagree    strongly agree
                d6c            d7a         d7b       d7c            d7d     e1   e2           e3 e3a
1           neither      no answer Q not asked no answer      no answer   male 1961 in [country]  -1
2             agree          agree Q not asked     agree strongly agree   male 1945 in [country]  -1
3             agree          agree Q not asked   neither          agree   male 1945 in [country]  -1
4 strongly disagree strongly agree Q not asked  disagree       disagree female 1961 in [country]  -1
                          e4 e4a e4b e6a         e6b                                           e7 e7a e8
1         large town or city  -1  48  -1 Q not asked                   other, not in labour force  -1 -1
2 small or middle-sized town  -1  63  -1 Q not asked employed full-time [32 hrs or more per week]  -1 -1
3      rural area of village  -1  64  -1 Q not asked                                      retired  -1 -1
4      rural area of village  -1  48  -1 Q not asked               employed part-time [15-32 hrs]  -1 -1
                        e9                               e10                          e11        e12a
1                    never                              None married or living as married Q not asked
2                    never                              None married or living as married Q not asked
3     2 or 3 times a month Protestant, no denomination given married or living as married Q not asked
4 a number of times a year                    Roman Catholic married or living as married Q not asked
         e12b        e12c e13 e14 e15a e15b
1 Q not asked Q not asked  -1  -1   -1   -1
2 Q not asked Q not asked  -1  -1   -1   -1
3 Q not asked Q not asked  -1  -1   -1   -1
4 Q not asked Q not asked  -1  -1   -1   -1
 [ reached 'max' / getOption("max.print") -- omitted 2 rows ]

My variables:

  1. Y variable (if an MP should follow the voters position on a certain issue or the party position): d4a
  2. X1 variable (immigrants should be required to adapt to the customs of the country): c2a
  3. X2 variable (politics should abstain from intervening in the economy): c2b
  4. X3 variable (gender): e1
  5. X4 variable (year of birth): e2
  6. X5 variable (subjective size of hometown): e4
$\endgroup$
  • $\begingroup$ I'm a little confused about what you're asking. A logistic regression will estimate the probability of an MP sharing or not sharing the party stance based on the x variables you have provided. Is that what you want to do? This won't test if an MP should swap their stance, though you may be able to identify some outliers who would be better aligned with the population if they did swap. Additionally, are all of the MPs from the same party and so a "follow" is the same for every row? $\endgroup$ – Harry Jul 25 at 22:31
  • $\begingroup$ @Harry, what I want to ask is if logistic regression is the best way to estimate if an MP will share the voters position or the party position. I don't intend to to if an MP should swap their stance. $\endgroup$ – Nikolay Bogdanov Jul 26 at 11:54
1
$\begingroup$

I would use logistic regression. In order to make sure this is the correct model you'll need to make sure you satisfy a few assumptions which are outlined here.

https://www.statisticssolutions.com/assumptions-of-logistic-regression/

| cite | improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.