[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
I have a list of variables Q10A to Q10N and wrote the following piece of
code to run a set logistic regression analyses with each of those
variables as the dependent variable:
foreach var of varlist Q10A-Q10N ///
replace `var'rec=0 if `var'==2
replace `var'rec=1 if `var'==1
xi i.Q6 i.Q17 i.Q18
svy: logistic `var'rec _IQ6* Q7rec Q15 Q16 _IQ17* _IQ18* Q21
I also have a list of variables Q11A to Q11N and somehow I want to make
my code include Q11A in -xi- and -svy:logistic- as an independent
variable of the dependent variable Q10Arec; Q11B in -xi- and
-svy:logistic- as an independent variable of the dependent variable
Q10Brec; Q11C for Q10Crec and so on.
Any suggestions would be much appreciated!
* For searches and help try: