Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: RE: RE: construct a loop


From   "Liao, Junlin" <[email protected]>
To   "[email protected]" <[email protected]>
Subject   st: RE: RE: construct a loop
Date   Sat, 19 Feb 2011 17:19:06 +0000

I forgot to note the locals appropriately. But you get the idea.
________________________________________
From: [email protected] [[email protected]] on behalf of Liao, Junlin [[email protected]]
Sent: Saturday, February 19, 2011 11:16 AM
To: [email protected]
Subject: st: RE: construct a loop

forvalues a=0(1)2 {
   forvalues b=1(1)3 {
        if b>a {
           <Your function:> stmh varX, c(`b',`a')
        }
  }
}
________________________________________
From: [email protected] [[email protected]] on behalf of Nikolaos Pandis [[email protected]]
Sent: Saturday, February 19, 2011 6:03 AM
To: [email protected]
Subject: st: construct a loop

Hi to all.

I would like to run the following commands using the 4 level varX:
stmh varX,c(1,0)
stmh varX,c(2,0)
stmh varX,c(3,0)
stmh varX,c(2,1)
stmh varX,c(3,1)
stmh varx,c(3,2)

I would grateful if someone would help me construct a loop to run all the above commands.

Many thanks,

Nick




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index