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]

Re: st: RE: foreach command


From   William Buchanan <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: RE: foreach command
Date   Wed, 12 Dec 2012 16:37:25 -0800

Get rid of the single quotes in the -foreach- statement and use the left and right single quotes inside the loop.

HTH,
Billy

Sent from my iPhone

On Dec 12, 2012, at 16:26, megan rossi <[email protected]> wrote:

> Hi all,
> I am trying to use the loop function on a set of pre -existing variables 
> variable 1) total_IS_0
> variable 2) free_IS_0 
> Variable 3) total_PCS_0 
> Variable 4) free_PCS_0 
> My syntax is....
> foreach 'var' of varlist total_IS_0 free_IS_0 total_PCS_0 free_PCS_0 {
> summarize 'var'
> }
> I have stat 12 and it is coming up with r 198 invalid name... I am not sure what is wrong with my syntax? Also is there a way to incorporate this loop function with the drop down selections option or is it only avaliable with manual entry?
> Cheers,
> 
> PhD Candidate School of Medicine, University of Queensland
> Accredited Practicing Dietitian
> Princess Alexandra Hospital Nutrition & Dietetic Department
> m: 0402 931 441 | e: [email protected]
> "Let food be thy medicine and medicine be thy food." — Hippocrates (ca. 460 – 377 BC)
> ********************************************************************************
> This email, including any attachments sent with it, is confidential and for the sole use of the intended recipient(s). This confidentiality is not waived or lost, if you receive it and you are not the intended recipient(s), or if it is transmitted/received in error.
> Any unauthorised use, alteration, disclosure, distribution or review of this email is strictly prohibited. The information contained in this email, including any attachment sent with it, may be subject to a statutory duty of confidentiality if it relates to health service matters.
> **********************************************************************************
> ----------------------------------------
>> Date: Wed, 12 Dec 2012 18:25:34 -0500
>> Subject: Re: st: fixed effects quantile regression
>> From: [email protected]
>> To: [email protected]
>> 
>> On Wed, Dec 12, 2012 at 2:49 PM, Austin Nichols <[email protected]> wrote:
>>> JVerkuilen (Gmail) <[email protected]>:
>>> -suest- does not work with -qreg-.
>> 
>> :(
>> 
>> 
>> 
>>> Lisa Marie Yarnell <[email protected]>:
>>> On -qreg- with FE, there are many different forms, all interpreted differently.
>>> See e.g.
>>> http://www.rand.org/content/dam/rand/pubs/working_papers/2012/RAND_WR710-2.pdf
>>> for a good review of how people have tackled it.
>> 
>> That's a nice reference, thanks.
>> 
>> Jay
>> *
>> * For searches and help try:
>> * http://www.stata.com/help.cgi?search
>> * http://www.stata.com/support/faqs/resources/statalist-faq/
>> * http://www.ats.ucla.edu/stat/stata/                         
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/statalist-faq/
> *   http://www.ats.ucla.edu/stat/stata/

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


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