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: predicting height by age for each individual


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: predicting height by age for each individual
Date   Thu, 30 Jan 2014 16:47:22 +0100

I have two comments:

As a father I can tell you that height does not change linearly with
age in that period. You might want to look at -fp- in order to create
a reasonable model.

Imangine what happens in your code when you have three persons. Your
first regression will fill in for person 2 and 3, your second
regression will be used to fill in 1 and 3, but wait.. you already
filled in for person 3. What do you want to do in that case?

-- Maarten


On Thu, Jan 30, 2014 at 4:26 PM, Y.R.E. Retamal <[email protected]> wrote:
> Dear STATA users
>
> I am studying growth and development in children from 0 to 3 years old. I am
> using a longitudinal database of children where height and weight were
> measured from birth to three years old (1600 children).
> I would like to predict height of each child from birth until three years
> old for each six months (birth, 6, 12, 18, ..., 36 month), after running a
> linear regression of height by age for each child, not all at the same time.
> For example, I have the following database:
>
> id      month   height
> 1       0       59
> 1       6       68
> 1       12      70
> 1       18      74
> 1       24      81
> 1       30      86
> 1       36      94
> 2       0       50
> 2       6       55
> 2       12      74
> 2       18      80
> 2       24      82
> 2       30      87
> 2       36      95
>
>
> I could do:
> reg height month if id==1
> predict xb if id!=1
> reg height month if id==2
> predict xb if id!=2
>
> and so...
>
> But, I have 1600 children, therefore I should write the same commands per
> each child (1600 times), something truly inefficient and tedious. There is a
> command or program to run the same commands, but automatically?
>
>
> Any help would be very appreciated.
> Rodrigo
>
> *
> *   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/



-- 
---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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