To that end, I re-estimate my model after standardising the continuous variables (using the center command) and leave my categorical and dummy variables untouched. I am surprised that there is no change in the size of the coefficient values which makes me think I’m running the standardised model incorrectly. The code I am using is attached below as is example data.
I assume that I shouldn't be standardising the dummies or the country and year fixed effects since the size of the "magnitude" is captured from the baseline.
Code:
logit voted i.corevar i.gender age i.ethnic eduyrs swi religious i.domicil swd econview politic_interest i.extreme lrscale i.cntryID i.year if fulldata==1 & identifier==1 [pw=weight], robust cluster(cntry) center age eduyrs swi religious swd econview politic_interest lrscale [pw=weight] if fulldata==1 & identifier==1 logit voted i.corevar i.gender c_age i.ethnic c_eduyrs c_swi c_religious i.domicil c_swd c_econview c_politic_interest i.extreme c_lrscale i.cntryID i.year if fulldata==1 & identifier==1 [pw=weight], robust cluster(cntry)
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float(voted corevar) double(gender agea) float ethnic double(eduyrs swi religious domicil swd econview politic_interest) float extreme double lrscale long cntryID float(year fulldata) double identifier float weight str2 cntry 0 0 0 64 0 12 3 1 3 7 8 1 0 5 1 2002 0 1 .2420854 "AT" 1 0 1 76 0 8 2 8 5 0 0 1 1 . 1 2002 0 1 .2095612 "AT" 1 0 0 63 . 9 3 7 3 5 7 3 0 5 1 2002 0 1 .25660998 "AT" 0 0 0 62 0 12 2 1 3 3 0 3 1 . 1 2002 0 1 .24710792 "AT" 1 0 0 33 0 12 3 5 3 5 4 3 0 5 1 2002 0 0 .12852219 "AT" 1 0 0 38 0 15 3 9 1 5 6 4 0 4 1 2002 0 0 .15444924 "AT" 1 0 1 68 0 6 3 5 4 5 5 2 1 . 1 2002 0 1 .1719059 "AT" 0 0 1 . 0 16 3 8 4 8 6 3 1 1 1 2002 0 1 .27422953 "AT" 1 0 0 31 0 13 4 2 3 6 7 2 0 7 1 2002 0 1 .2577774 "AT" 1 0 1 38 0 22 3 7 1 9 6 4 0 5 1 2002 0 1 .2987177 "AT" 1 0 1 48 0 12 2 5 1 8 6 1 0 4 1 2002 0 1 .3828788 "AT" 1 0 1 56 0 9 3 7 5 6 6 2 0 6 1 2002 0 1 .4570764 "AT" 1 0 1 73 0 11 3 8 4 9 7 2 0 5 1 2002 0 1 .2252532 "AT" 1 0 1 44 0 18 4 7 2 7 3 3 0 5 1 2002 0 1 .29472685 "AT" 1 0 0 24 0 11 4 7 4 7 5 4 0 6 1 2002 0 0 .29372233 "AT" 1 0 0 50 0 10 4 0 4 7 8 3 0 6 1 2002 0 1 .2444745 "AT" 1 0 1 76 0 11 3 8 1 8 8 2 0 6 1 2002 0 0 .13989751 "AT" 1 0 1 43 0 13 4 7 3 3 4 4 0 5 1 2002 0 1 .2252532 "AT" 1 0 0 51 . 12 4 5 4 0 0 2 1 10 1 2002 0 0 .09931013 "AT" 1 0 0 42 0 10 2 7 1 2 5 3 1 . 1 2002 0 1 .3089256 "AT" 1 0 1 77 0 11 3 5 4 10 2 1 1 9 1 2002 0 1 .18759787 "AT" 1 0 0 50 0 11 3 5 3 5 4 3 0 5 1 2002 0 1 .6195073 "AT" 1 0 1 30 0 12 3 5 4 4 2 1 1 . 1 2002 0 0 .50263196 "AT" 1 0 0 48 0 13 3 7 4 4 4 2 1 . 1 2002 0 1 .4655739 "AT" 1 0 1 74 0 18 4 7 1 . 7 4 0 7 1 2002 0 0 .13873011 "AT" 1 0 0 37 0 13 4 5 4 4 5 3 0 3 1 2002 0 1 .29616573 "AT" 0 0 0 41 0 11 3 8 4 5 . 2 1 0 1 2002 0 0 .09431476 "AT" 1 0 0 63 1 12 3 8 3 6 6 3 0 5 1 2002 0 0 .12102913 "AT" 1 0 0 24 0 13 3 2 3 9 6 3 0 4 1 2002 0 1 .2420854 "AT" 1 0 0 84 0 8 3 9 2 5 4 2 0 5 1 2002 0 0 .14730912 "AT" 1 0 1 67 0 14 4 5 3 4 7 3 0 7 1 2002 0 1 .27420238 "AT" . 0 0 49 1 12 2 10 2 10 10 2 0 6 1 2002 0 1 .5663772 "AT" 1 0 0 65 0 12 3 5 4 5 6 2 1 2 1 2002 0 1 .331622 "AT" . 0 0 17 0 11 4 3 5 6 4 2 0 5 1 2002 0 0 .3150069 "AT" 1 0 0 42 0 9 3 10 3 5 0 2 0 5 1 2002 0 1 .3771776 "AT" 1 0 0 59 0 19 3 5 4 1 4 3 1 . 1 2002 0 1 .18759787 "AT" 0 0 0 25 0 17 4 3 1 5 5 2 0 6 1 2002 0 0 .13101988 "AT" 1 0 0 48 0 12 3 5 2 5 4 4 0 7 1 2002 0 1 .25525254 "AT" 1 0 1 62 0 10 3 3 2 9 7 4 1 2 1 2002 0 0 .12219653 "AT" 1 0 1 47 0 15 4 8 4 5 6 3 0 5 1 2002 0 1 .32146835 "AT" 1 0 1 66 0 12 1 7 4 5 5 3 0 5 1 2002 0 1 .4328325 "AT" 1 0 1 44 0 13 1 7 1 9 5 1 0 3 1 2002 0 1 .2620669 "AT" 1 0 0 47 0 16 3 1 4 5 3 2 1 2 1 2002 0 0 .2439858 "AT" 1 0 0 45 0 19 2 6 4 2 3 3 1 8 1 2002 0 0 .20920826 "AT" 1 0 0 68 0 8 3 5 4 10 7 2 1 8 1 2002 0 1 .16520014 "AT" 1 0 1 21 0 12 3 7 4 0 . 3 1 0 1 2002 0 0 .4336199 "AT" 1 0 1 33 1 22 3 5 1 8 7 3 0 5 1 2002 0 0 .12762627 "AT" . 0 0 18 1 12 3 5 3 4 7 3 0 5 1 2002 0 0 .3036045 "AT" 1 0 1 52 0 11 4 3 3 1 2 2 0 3 1 2002 0 1 .20280117 "AT" 0 0 1 38 0 14 4 0 2 6 8 3 0 5 1 2002 0 1 .2845732 "AT" 1 0 1 21 0 14 3 4 4 5 6 2 0 3 1 2002 0 0 .8539368 "AT" 1 0 1 20 0 12 2 1 4 8 4 1 1 . 1 2002 0 0 .12662177 "AT" 1 0 1 61 0 8 3 8 4 6 5 4 1 . 1 2002 0 1 .18447576 "AT" 1 0 1 53 0 11 3 6 4 7 7 4 0 5 1 2002 0 1 .3045004 "AT" 1 0 0 59 0 9 2 5 4 3 3 2 1 . 1 2002 0 0 .09882145 "AT" 1 0 1 61 0 14 3 6 4 8 6 3 0 6 1 2002 0 1 .2063305 "AT" 0 0 0 21 0 14 4 7 2 7 6 1 0 4 1 2002 0 0 .426344 "AT" 1 0 1 65 0 9 3 6 4 9 9 2 1 8 1 2002 0 1 .5275817 "AT" 1 0 1 63 1 18 3 5 1 6 5 3 0 3 1 2002 0 1 .4127696 "AT" 0 0 0 84 0 8 1 9 2 . 3 1 0 5 1 2002 0 0 .12561727 "AT" 1 0 0 85 0 10 3 8 4 7 5 2 1 . 1 2002 0 0 .09966306 "AT" . 0 1 33 1 6 1 8 2 . . 2 1 . 1 2002 0 1 .25424805 "AT" 0 0 0 20 0 12 4 1 1 4 1 1 0 4 1 2002 0 0 .3042832 "AT" 1 0 1 41 0 12 3 8 2 4 3 3 0 5 1 2002 0 0 .10712897 "AT" 1 0 1 41 0 16 3 0 4 8 8 2 0 5 1 2002 0 1 .3798653 "AT" 1 0 1 65 0 12 3 3 2 0 0 2 0 4 1 2002 0 1 .27979502 "AT" 1 0 0 35 0 20 4 0 1 10 8 4 0 4 1 2002 0 1 .2677681 "AT" 1 0 1 56 0 . 3 5 4 7 7 3 0 5 1 2002 0 1 .20641196 "AT" 0 0 1 23 0 13 4 0 4 . . 1 1 10 1 2002 0 0 .09936443 "AT" 1 0 1 70 0 8 2 9 4 6 5 1 1 . 1 2002 0 1 .6423666 "AT" 1 0 1 46 0 16 3 0 3 7 5 4 0 5 1 2002 0 0 .13710119 "AT" 0 0 0 50 0 9 3 2 4 6 3 1 0 5 1 2002 0 1 .3150069 "AT" 1 0 1 55 0 8 2 0 4 3 8 2 0 5 1 2002 0 1 .21960625 "AT" 1 0 1 29 1 12 2 10 1 7 8 3 1 . 1 2002 0 0 .13101988 "AT" . 0 0 35 0 16 2 5 3 5 7 4 0 5 1 2002 0 1 .3101473 "AT" 1 0 0 23 0 12 1 3 3 5 3 1 0 4 1 2002 0 0 .12852219 "AT" 1 0 0 63 0 12 2 5 1 4 3 3 1 2 1 2002 0 0 .15154433 "AT" 0 0 1 53 0 19 3 5 1 3 7 4 0 5 1 2002 0 1 .6062316 "AT" 1 0 1 38 0 12 4 3 3 7 6 3 0 5 1 2002 0 1 .25392225 "AT" 1 0 1 25 0 18 4 3 1 . 5 2 1 8 1 2002 0 0 .13873011 "AT" 1 0 0 42 0 9 3 4 3 8 8 2 0 6 1 2002 0 0 .24846536 "AT" 1 0 1 73 0 9 3 2 1 7 6 2 0 4 1 2002 0 1 .3089256 "AT" 1 0 0 62 0 13 3 5 1 0 0 3 0 5 1 2002 0 0 .13194293 "AT" 1 0 0 79 1 8 3 8 2 7 8 2 1 . 1 2002 0 0 .13989751 "AT" 1 0 1 40 0 12 3 6 4 10 5 3 0 5 1 2002 0 1 .3045004 "AT" 1 0 1 55 0 18 4 0 3 8 9 1 1 8 1 2002 0 1 .25126168 "AT" 1 0 0 55 0 10 3 4 1 8 7 2 1 2 1 2002 0 0 .15444924 "AT" 1 0 0 36 1 9 3 7 4 0 3 3 0 6 1 2002 0 1 .2479224 "AT" 1 0 1 56 0 15 3 7 4 6 5 2 0 4 1 2002 0 1 .2479767 "AT" 1 0 1 71 0 18 4 7 3 6 6 4 0 7 1 2002 0 0 .13710119 "AT" 1 0 1 60 0 12 4 8 4 8 6 4 0 6 1 2002 0 1 .4959534 "AT" 1 0 1 68 0 8 4 4 2 7 7 4 1 2 1 2002 0 1 .25424805 "AT" 1 0 0 24 0 16 4 4 1 5 3 3 0 3 1 2002 0 1 .3139753 "AT" 0 0 1 62 0 12 3 2 4 4 4 3 0 7 1 2002 0 1 .2179773 "AT" 0 0 1 23 0 9 3 4 4 7 7 3 1 0 1 2002 0 0 .13951743 "AT" 1 0 0 63 0 20 3 10 2 2 4 4 1 0 1 2002 0 1 .3042832 "AT" 0 0 0 58 0 11 4 8 1 0 7 1 0 5 1 2002 0 0 .1422866 "AT" 1 0 1 66 0 11 2 8 3 . 5 3 0 4 1 2002 0 0 .09670385 "AT" 1 0 0 38 0 13 3 5 3 5 7 3 0 5 1 2002 0 0 .12778917 "AT" 1 0 0 53 0 11 4 0 1 4 6 2 0 7 1 2002 0 1 .3042832 "AT" end label values gender gender label def gender 0 "Female", modify label def gender 1 "Male", modify label values agea agea label values eduyrs eduyrs label values swi swi label def swi 1 "Very difficult on present income", modify label def swi 2 "Difficult on present income", modify label def swi 3 "Coping on present income", modify label def swi 4 "Living comfortably on present income", modify label values religious rlgdgr label def rlgdgr 0 "Not at all religious", modify label def rlgdgr 1 "1", modify label def rlgdgr 2 "2", modify label def rlgdgr 3 "3", modify label def rlgdgr 4 "4", modify label def rlgdgr 5 "5", modify label def rlgdgr 6 "6", modify label def rlgdgr 7 "7", modify label def rlgdgr 8 "8", modify label def rlgdgr 9 "9", modify label def rlgdgr 10 "Very religious", modify label values domicil domicil label def domicil 1 "A big city", modify label def domicil 2 "Suburbs or outskirts of big city", modify label def domicil 3 "Town or small city", modify label def domicil 4 "Country village", modify label def domicil 5 "Farm or home in countryside", modify label values swd stfdem label def stfdem 0 "Extremely dissatisfied", modify label def stfdem 1 "1", modify label def stfdem 2 "2", modify label def stfdem 3 "3", modify label def stfdem 4 "4", modify label def stfdem 5 "5", modify label def stfdem 6 "6", modify label def stfdem 7 "7", modify label def stfdem 8 "8", modify label def stfdem 9 "9", modify label def stfdem 10 "Extremely satisfied", modify label values econview stfeco label def stfeco 0 "Extremely dissatisfied", modify label def stfeco 1 "1", modify label def stfeco 2 "2", modify label def stfeco 3 "3", modify label def stfeco 4 "4", modify label def stfeco 5 "5", modify label def stfeco 6 "6", modify label def stfeco 7 "7", modify label def stfeco 8 "8", modify label def stfeco 9 "9", modify label def stfeco 10 "Extremely satisfied", modify label values politic_interest politic_interest label def politic_interest 1 "Not at all interested", modify label def politic_interest 2 "Hardly Interested", modify label def politic_interest 3 "Quite Interested", modify label def politic_interest 4 "Very interested", modify label values lrscale lrscale label def lrscale 0 "Left", modify label def lrscale 1 "1", modify label def lrscale 2 "2", modify label def lrscale 3 "3", modify label def lrscale 4 "4", modify label def lrscale 5 "5", modify label def lrscale 6 "6", modify label def lrscale 7 "7", modify label def lrscale 8 "8", modify label def lrscale 9 "9", modify label def lrscale 10 "Right", modify label values cntryID cntryID label def cntryID 1 "AT", modify label values identifier partner label def partner 1 "Lives with husband/wife/partner at household grid", modify
0 Response to Standardised independent variables using logistic regression
Post a Comment