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: lms command line
From
Austin Nichols <[email protected]>
To
[email protected]
Subject
Re: st: lms command line
Date
Thu, 2 Dec 2010 15:05:51 -0500
Gilberto Kac <[email protected]> :
I have not used -lms- but it is easy enough to estimate a -qreg- (in
time or powers of time or splines in time) or local -qreg-s, e.g.
clear all
u weight age using http://www.stata-press.com/data/r11/nhanes2.dta
g q20=.
g q80=.
qui forv i=20/74 {
g kw=max(5-abs(`i'-age),0)
qreg weight age [aw=kw], q(20)
predict hat
replace q20=hat if age==`i'
drop hat
qreg weight age [aw=kw], q(80)
predict hat
replace q80=hat if age==`i'
drop hat kw
}
sort age
sc weight age, mc(gs12)||line q20 q80 age, leg(order(2 - 3))
On Thu, Dec 2, 2010 at 2:47 PM, Gilberto Kac <[email protected]> wrote:
> Hi,
>
> I have been trying to estimate a lms for a prospective dataset of
> weight during pregnancy. I want to estimate selected percentiles for
> weight as dependent and time as independent in days as continuos or
> can be visit number. I am trying to write the command line but as I am
> new using stata I am having a hard time. I would appreciate if someone
> could help me here.
>
> cheers
*
* 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/