Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: automating a series of equations


From   "Don Spady" <[email protected]>
To   "Statalist" <[email protected]>
Subject   st: automating a series of equations
Date   Thu, 8 May 2003 17:11:27 -0600

Dear All

I need some help with repeating tasks.  I am doing a series of
logistic regressions and want to automate the task.


Say I have an equation
logistic  depvar indepvar sexfm interactionterm if agegrp == X
lincom indepvar + interaction term (sexfm+indepvar)
I have about 8 depvars and 25 indepvars and 3 agegrps.
I want to do all 8 depvars and 25 indepvars at 3 agegrps and do a lincom
on each outcome.
it is easy to automate the system using for var "x": if you are not
doing lincom.  Use of lincom introduces a new command and I don't know
how to
deal with it.
How do I do a for var depvar1 ... depvar10 and then do a lincom for each
equation as it comes up.  I think it needs a loop within a loop but I am
not at all sure how to do that.

Thanks in Advance for your help.


Donald Spady
Dep't of Pediatrics, University of Alberta
(780) 407-1244

Nature has no reset button.


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index