Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: dropping vars from analysis under conditions
From
"K.O. Ivanova" <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: dropping vars from analysis under conditions
Date
Tue, 17 Apr 2012 09:55:53 +0000
Hello, all.
I am trying to run an identical model for several different countries (for = all, the data are expanded by the amount of time the respondent was looking for a partner):
by female: logit rel edu_genrank agesep_tvc sepcoh_cont ch_res_dum2 ch_res_dum3 ch_res_dum4 ch_res_dum5 interval2 interval3 interval4 interval5 interval6 interval7
The thing is that for some countries, the child residence dummies (ch_res_dum2, etc.) have too few cases for one (or both) of the genders (for example, in one country, there are only 15 women who say that they have shared custody of their kid).
I know that there is a way to tell Stata to drop a variable from the analysis under certain conditions but I don't know what it is. Basically, I want to run my syntax but then add a statement which tells Stata to drop one (or more than one) of these residence dummies from that list of predictors if the number of cases for that dummy is smaller than... e.g.:
by female: logit rel edu_genrank agesep_tvc sepcoh_cont ch_res_dum2 ch_res_dum3 ch_res_dum4 ch_res_dum5 interval2 interval3 interval4 interval5 interval6 interval7 (do not consider ch_res_dum2 OR ch_res_dum3 OR ch_res_dum4 OR ch_res_dum5 if n for ch_res_dum(2,3,4,5) < 40).
Thank you for the help!
Katya
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/