Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Re: functions of different subsets of data?


From   "Gustaf Rydevik" <[email protected]>
To   [email protected]
Subject   Re: st: Re: functions of different subsets of data?
Date   Wed, 6 Dec 2006 18:29:23 +0300

On 12/6/06, Michael Blasnik <[email protected]> wrote:
Your message is quite confusing -- it's not really clear what you want to
do, most of the Stata commands you show are not valid syntax and you
reference values of agegroup that do not appear in the data you show.  I
think you are trying to share your frustration with the list?  Based on my
best guess, you want the means of certain variables for certain observations
and then want to perform a calculation with them.  This task is probably
best done using local macros or scalars.
<Snip very helpful answer>


Thank you very much!
Your answer does answer my question. I had looked up local macros, but
couldn't figure out how to use them in conjunction with an "if"
statement. Your use of "sum" I hadn't even thought of.

And sorry for the confusing message. Next time i'm sending a mail
after a long day, I'll make sure that all brackets are in the right
place, and that I've actually coded everything I'm asking about :-).

Again, thanks a lot!

Best,

Gustaf Rydevik
*
*   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