Hi everyone,
I am new to Stata and have been struggling with running logit. I am using StataSE 13. When I run logit, I keep getting "no observations; r(2000)". Here is basic info about my data set:
Number of observations: 88
Dependent variable: "forsames"
Independent variable: "polaff" (politicalaffiliation)
I have checked the manual and other help threads (e.g. I am using 0,1 variables; I'm not missing any data, etc.), but nothing seems to be working.
I would be incredibly grateful for any help or suggestions!
I am new to Stata and have been struggling with running logit. I am using StataSE 13. When I run logit, I keep getting "no observations; r(2000)". Here is basic info about my data set:
Number of observations: 88
Dependent variable: "forsames"
Independent variable: "polaff" (politicalaffiliation)
Code:
*Tabulating the dependent variable tabulate forsames encode politicalaffiliation, generate (polaff) tabulate polaff tabulate polaff, nolabel *Generating political affiliation dummy variables generate amindep=0 replace amindep=1 if polaff==1 generate democrat=0 replace democrat=1 if polaff==2 generate green=0 replace green=1 if polaff==3 generate indep=0 replace indep=1 if polaff==4 generate libert=0 replace libert=1 if polaff==5 generate peace=0 replace peace=1 if polaff==6 generate repub=0 replace repub=1 if polaff==7 *Political affiliation as explanatory variable, democrats as baseline logit forsames amindep green indep libert peace repub
I would be incredibly grateful for any help or suggestions!
Comment