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: AW: Re:


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   RE: st: RE: AW: Re:
Date   Tue, 23 Feb 2010 19:43:40 +0100

<>

It is good to hear you are satisfied with the solution, but I am not quite
sure what your data structure looks like. You request three centiles from
Stata with your call -centile PF_norm, centile(5 50 95)-, but you store only
one of them, the 95% one, via -postfile-. This is your prerogative, but it
seems inefficient to me. What are the 5% and 50% quantile requests good for
in your call? 


You said in an earlier post that you have to repeat this process frequently,
so you may want to know that you can employ a loop to call your datasets:


*******
forv i=1/2{
use "C:\...\ALL_complete_1.`i'.dta"
//... your other commands
}
*******

The endpoint for the index here is 2, you can enter the appropriate number
yourself. 

Does each of those datasets really only contain one interesting variable?
Why are they dispersed across many datasets (just being curious)?


HTH
Martin

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of
[email protected]
Sent: Dienstag, 23. Februar 2010 19:03
To: [email protected]
Subject: Re: st: RE: AW: Re:

Hey guys,


sorry for having bothered you again, I found the solution in the meantime!
In case someone is interested, here´s the syntax:


log using test, replace
use "C:\...\ALL_complete_1.1.dta"
centile PF_norm, centile(5 50 95)
postfile internal lower_ci95 centile_95 upper_ci95 using "filename", replace
post internal (r(lb_3)) (r(c_3)) (r(ub_3))
clear
use "C:\...\ALL_complete_1.2.dta"
centile PF_norm, centile(5 50 95)
post internal (r(lb_3)) (r(c_3)) (r(ub_3))
postclose internal
clear
log close


Still thanks for the help you gave me so far!
Andreas
*
*   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/


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