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: return list


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: return list
Date   Thu, 24 Jan 2013 12:22:38 +0000

I am still fuzzy on what you want, but this may show some technique:

webuse hbp, clear
generate pop = 1
dstdize hbp pop age race sex, by(city year)
gen stuff = ""
quietly forval i = 1/19 {
     replace stuff = r(c`i') in `i'
}
split stuff

Nick

On Thu, Jan 24, 2013 at 12:01 PM, Alberto R Osella
<[email protected]> wrote:
> Thank you Nick for your answer. I know that one repeat is allowed but
> thinking about my question
> I saw the question had been not well formulated.
> Now I must work with you answer because I don't know how to save r(1) to
> r(42) with the saving option after
> -dstdize- or to built a loop with the macros.
>
>
> Alberto R. Osella, MD, PhD
> Laboratorio di Epidemiologia e Biostatistica
> IRCCS Saverio de Bellis
> Via Turi, 27
> 70013 Castellana Grotte (BA)
> Italia
> Tel:    +39 0804994655
> Fax:    +39 0804994650
> e-mail: [email protected]
>
> Il 24/01/2013 12:19, Nick Cox ha scritto:
>>
>> This is a repeat of a question asked on Monday. FAQ advice is that one
>> repeat is allowed, but it is best to wonder why there were no answers.
>>
>> In this case, I am not familiar with -dstdize-, so
>>
>> 1. Are you saying that the -saving()- option is not what you want?
>>
>> 2.  I guess you need to write a program (or do-file) if you prefer to
>> loop over the macros and copy their values into new variables. What
>> the new variables are depends on what structure you want.
>>
>> Nick
>>
>> On Thu, Jan 24, 2013 at 10:53 AM, Alberto R Osella
>> <[email protected]> wrote:
>>>
>>> Hi All,
>>> I'm using Stata 12.1 on W7 and after -dstdize- I'd like to extract macros
>>> (return list, in my case 42) in order to run -outfile- and obtain a
>>> labeled
>>> set of  standardized rates.
>>> I've obtained standardized rates from matrix (return list) by using
>>> -svmat-
>>> Can someone help me?
>>
>> *
>>
>> *   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