Hi,
I ran a logit regression with 12 outcomes and would like to post the marginal results for each outcome in a table using a loop. I initially had it so that all the outcomes would be in the table but I would like to have only certain outcomes show (for ex, outcomes 1, 4, 6, and 8). Any help on how to get certain outcomes using a loop would be greatly appreciated.
forval i=2/12{
est restore model1
quietly margins, at(homeown=(0 1) female=(0 1)) predict (outcome(`i')) post
eststo Temp`i'
etable, name(Table2) margins append
collect export MyTable1.docx, as(docx) replace
}
I ran a logit regression with 12 outcomes and would like to post the marginal results for each outcome in a table using a loop. I initially had it so that all the outcomes would be in the table but I would like to have only certain outcomes show (for ex, outcomes 1, 4, 6, and 8). Any help on how to get certain outcomes using a loop would be greatly appreciated.
forval i=2/12{
est restore model1
quietly margins, at(homeown=(0 1) female=(0 1)) predict (outcome(`i')) post
eststo Temp`i'
etable, name(Table2) margins append
collect export MyTable1.docx, as(docx) replace
}

Comment