Dear Stata experts,
I am calculating a model and would like to store the resulting OR and corresponding p-values as new variables.
Unfortunately, I did not succeed with this so far. I tried reading in the forum and the stata help command.
The outreg command also does help put I would prefer to have the variables.
Thank you in advance for your help!
I am calculating a model and would like to store the resulting OR and corresponding p-values as new variables.
Unfortunately, I did not succeed with this so far. I tried reading in the forum and the stata help command.
The outreg command also does help put I would prefer to have the variables.
Thank you in advance for your help!
Code:
foreach x of numlist 1 2 3 4 5 6 7 8 9 10 11 12 13 14 { foreach y of varlist v1 v2 v3 v4 v5 v6 { display `x' display `y' *xtmelogit `y' c.total c.fear c.happy c.angry c.sad C01 if COU==`x', or || SCHOOL: xtmelogit `y' c.total##(c.fear c.happy c.angry c.sad) i.C01 if COU==`x', or || SCHOOL: *outreg2 using motives`x'.xls, eform cti(odds ratio) dec(2) title(Table 1: motives all`x') excel } }
Comment