Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | "Liao, Junlin" <junlin-liao@uiowa.edu> |
To | "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu> |
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: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] on behalf of Liao, Junlin [junlin-liao@uiowa.edu] Sent: Saturday, February 19, 2011 11:16 AM To: statalist@hsphsun2.harvard.edu 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: owner-statalist@hsphsun2.harvard.edu [owner-statalist@hsphsun2.harvard.edu] on behalf of Nikolaos Pandis [npandis@yahoo.com] Sent: Saturday, February 19, 2011 6:03 AM To: statalist@hsphsun2.harvard.edu 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/