Greetings,
I'm analyzing survey data with Stata 14. My dependent variable is a 7-point ordinal item. Our statistics teacher recommended that we estimate both ordered logistic and OLS models and use the Hausman test to see whether the more efficient one (i.e. OLS) can be used. So I did the following:
It returns the following error message:
My teacher's powerpoint specified these exact instructions so I'm not sure where I'm going wrong. Any help would be much appreciated. Thanks in advance!
I'm analyzing survey data with Stata 14. My dependent variable is a 7-point ordinal item. Our statistics teacher recommended that we estimate both ordered logistic and OLS models and use the Hausman test to see whether the more efficient one (i.e. OLS) can be used. So I did the following:
Code:
regress Increase_NumImmigrants ideology party_ID
Code:
estimates store REG
Code:
ologit Increase_NumImmigrants ideology party_ID
Code:
estimates store ORD
Code:
hausman REG ORD
no coefficients in common; specify equations(matchlist)
for problems with different equation names.
for problems with different equation names.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input float Increase_NumImmigrants double ideology float party_ID 6 5 1 4 5 7 4 1 4 7 4 6 2 5 4 5 4 4 7 2 1 5 6 6 4 4 1 1 4 4 6 1 1 2 7 5 7 4 3 4 1 1 3 4 4 6 1 2 4 2 7 5 3 1 7 1 2 4 5 6 6 4 1 4 7 3 3 5 5 6 3 3 6 1 1 4 4 7 4 1 1 3 4 2 5 2 1 6 3 4 2 2 1 4 2 1 7 1 1 5 2 1 6 3 3 4 7 1 1 7 4 2 6 2 5 1 1 4 1 1 4 1 1 4 1 2 6 1 1 4 4 1 6 1 1 7 1 1 7 1 1 2 4 4 5 2 1 4 4 4 7 1 1 4 4 4 5 5 2 4 3 3 7 1 1 4 2 1 1 7 1 5 1 1 4 1 1 5 1 7 6 4 1 7 4 2 1 5 6 4 1 7 7 4 1 7 1 1 6 4 1 1 4 7 4 4 1 4 4 1 4 6 3 5 1 1 5 4 2 7 2 1 6 4 2 6 1 1 4 4 2 6 1 1 6 2 2 7 1 1 6 1 2 4 7 2 3 2 2 6 2 1 6 2 1 5 4 3 3 1 1 1 1 1 4 6 2 5 7 7 2 2 2 2 5 4 7 1 1 4 2 1 7 2 1 4 2 1 7 1 1 4 4 4 4 1 1 5 2 3 end label values ideology lcself label def lcself 1 "Very liberal", modify label def lcself 2 "Somewhat liberal", modify label def lcself 3 "Closer to liberals", modify label def lcself 4 "Neither liberal nor conservative", modify label def lcself 5 "Closer to conservatives", modify label def lcself 6 "Somewhat conservative", modify label def lcself 7 "Very conservative", modify
Comment