Hi guys!
Currently doing an experiment regarding infidelity, my dependent variable is sexual_affair which when tab-ed gives you a 0 and a 1, but when I run the heckprob command, it still gives me the error. What may be the problem?
my main equation is a bit long: heckprob sexual_affair i.educationlevel_men age_men i.relative_productivity Health_Vulnerability i.educationlevel_spouse i.age_spouse workpast12months_spouse Health_VulnerabilitySpouse sexratio infant_mortality life_expectancy premaritalsex, select(paid_sex refusesex_havesex_withanother sex_with_man women_noright_condom embarassed_tobuy_condom keep_it_asecret)
So I tried to use 3 variables (the DV, one explanatory and one in the select just to see if it would work)
heckprob sexual_affair urban, select( paid_sex)
. tab sexual_affair
Committed |
Sexual |
Infidelity | Freq. Percent Cum.
------------+-----------------------------------
0 | 1,946 81.76 81.76
1 | 434 18.24 100.00
------------+-----------------------------------
Total | 2,380 100.00
. tab urban
urban | Freq. Percent Cum.
------------+-----------------------------------
0 | 1,230 51.68 51.68
1 | 1,150 48.32 100.00
------------+-----------------------------------
Total | 2,380 100.00
. tab paid_sex
paid_sex | Freq. Percent Cum.
------------+-----------------------------------
0 | 2,202 92.52 92.52
1 | 178 7.48 100.00
------------+-----------------------------------
Total | 2,380 100.00
But it still gives me:
selection equation:
outcome does not vary; remember:
0 = negative outcome,
all other nonmissing values = positive outcome
r(2000);
Thank you in advance!!!
Currently doing an experiment regarding infidelity, my dependent variable is sexual_affair which when tab-ed gives you a 0 and a 1, but when I run the heckprob command, it still gives me the error. What may be the problem?
my main equation is a bit long: heckprob sexual_affair i.educationlevel_men age_men i.relative_productivity Health_Vulnerability i.educationlevel_spouse i.age_spouse workpast12months_spouse Health_VulnerabilitySpouse sexratio infant_mortality life_expectancy premaritalsex, select(paid_sex refusesex_havesex_withanother sex_with_man women_noright_condom embarassed_tobuy_condom keep_it_asecret)
So I tried to use 3 variables (the DV, one explanatory and one in the select just to see if it would work)
heckprob sexual_affair urban, select( paid_sex)
. tab sexual_affair
Committed |
Sexual |
Infidelity | Freq. Percent Cum.
------------+-----------------------------------
0 | 1,946 81.76 81.76
1 | 434 18.24 100.00
------------+-----------------------------------
Total | 2,380 100.00
. tab urban
urban | Freq. Percent Cum.
------------+-----------------------------------
0 | 1,230 51.68 51.68
1 | 1,150 48.32 100.00
------------+-----------------------------------
Total | 2,380 100.00
. tab paid_sex
paid_sex | Freq. Percent Cum.
------------+-----------------------------------
0 | 2,202 92.52 92.52
1 | 178 7.48 100.00
------------+-----------------------------------
Total | 2,380 100.00
But it still gives me:
selection equation:
outcome does not vary; remember:
0 = negative outcome,
all other nonmissing values = positive outcome
r(2000);
Thank you in advance!!!
Comment