Dear All,
I am trying to loop a logistic regression for a number of variables that of which I want results to be exported to Excel, so far unfortunately it is not working. I am hoping for some feedback with regard tot the syntax I've written so far.
I have tried a number of variances of the syntax above. I am using stata 13 and for some reason it is not accepting the `row' which I have seen used in a number of different syntaxes.
the `row' gives me:
A: invalid cell name
r(198);
What I am basically trying to get is a table which in the A would give me the names of the variables A; B; C etc., B the odds ratio, C the p-value and D(and or E) the 95% CI.
Thanks in advance.
Best,
Jasper Tromp
I am trying to loop a logistic regression for a number of variables that of which I want results to be exported to Excel, so far unfortunately it is not working. I am hoping for some feedback with regard tot the syntax I've written so far.
Code:
foreach X of varlist A B C { logistic SEX `X' putexcel A`row'=("`X'") B1`row'=(r(Odds ratio)) using bla.xlsx, modify keepcellformat sheet("results") }
the `row' gives me:
A: invalid cell name
r(198);
What I am basically trying to get is a table which in the A would give me the names of the variables A; B; C etc., B the odds ratio, C the p-value and D(and or E) the 95% CI.
Thanks in advance.
Best,
Jasper Tromp
Comment