Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: st: ln transform and box cox


From   Thomas Norris <T.Norris2@lboro.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: ln transform and box cox
Date   Wed, 6 Mar 2013 17:10:37 +0000

Rebecca, 
Thanks for your input and for the slides. 

It is natural to observe increased variation between (human) fetuses as gestation progresses and this is why I logged the weight variable (and to help the models converge). The fracpoly command returned powers of 1 and 2 when weight was on the log scale. My analysis thus far has been to try and obtain the best fitting age terms for the data and then I was going to add explanatory variables to the model (ethnicity, sex, maternal height & weight).

Tom 

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Rebecca Pope
Sent: 06 March 2013 16:52
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: ln transform and box cox

Left unaddressed thus far is the issue of _why_ you are seeing increased variance as age increases. Before going any further, one thing I'd be really curious about is whether there was some underlying cause (e.g. gender differences, age of the mother) for divergent weights that you should include in your model but currently are not.
You don't say what kind of fetuses you are weighing, but I'm guessing humans because of your affiliation. After birth, one of closest correlates will be length of the infant, height of the child, and so forth. Measurement of fetuses is way outside my area of expertise, so I don't know if it is possible to gather additional information, but I hope the general point comes through.

I am also not convinced that -fracpoly- is really needed. From a biological standpoint, just thinking about the relationship between weight and age, it doesn't make much sense to choose a function for age other than age+age^2 or ln(age). I think age+age^2 is probably more common.

Take a look at these slides. There are some good books out there for longitudinal modeling, but happily the slides cover many of the issues and have the benefit of being free. They also happen to address growth curve modeling with -xtmixed-.

http://www.stata.com/meeting/fnasug08/gutierrez.pdf

I concur with Maarten's recommendation to see Fitzmaurice, Laird, and Ware. It is an excellent text & you if don't have a copy you should get one.

Regards,
Rebecca

On Wed, Mar 6, 2013 at 9:58 AM, Maarten Buis <maartenlbuis@gmail.com> wrote:
> Yes it does make a big difference. You could look at -xtgee- as a 
> panale data generalization of -glm-, and -xtgee- is an alowed program 
> in -fracpoly-. However, whether or not that model estimates what you 
> want it to estimate becomes very subtle question. See for example 
> chapter 13 of G.M. Fitzmaurice, N.M. Laird and J.H. Ware (2004) 
> "Applied Longitudinal Analysis". Hoboken: Wiley. Your data structure 
> certainly makes Box-Cox regression not an option.
>
> Hope this helps,
> Maarten
>
> On Wed, Mar 6, 2013 at 4:43 PM, Thomas Norris wrote:
>> Thank you both for your advice, I will get the book. As my models are using serially collected data in the same participant, I was fitting using xtmixed, not regress. Does this change things? Please excuse my ignorance.
>>
>> Many thanks,
>>
>> Tom
>>
>>
>>
>> -----Original Message-----
>> From: owner-statalist@hsphsun2.harvard.edu 
>> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of JVerkuilen 
>> (Gmail)
>> Sent: 06 March 2013 15:36
>> To: statalist@hsphsun2.harvard.edu
>> Subject: Re: st: ln transform and box cox
>>
>> 100% agree with Maarten and it's what I show in class now.
>>
>> However, if you want to do transformations I highly recommend getting your hands on a copy of A. C. Atkinson's Plots, Transformations & Regression (Oxford, 1986).
>>
>>
>> On Wed, Mar 6, 2013 at 10:16 AM, Maarten Buis <maartenlbuis@gmail.com> wrote:
>>> On Wed, Mar 6, 2013 at 4:07 PM, Thomas Norris wrote:
>>>> I am running estimated fetal weight growth models. Weight shows increasing variance as gestation proceeds so I was advised to take the natural logarithm of weight to address this issue. However I am having doubts about whether this transformation is appropriate. Should I instead use a box cox transformation of the weight variable?
>>>>
>>>> If this is the case, how would I proceed with running the box cox? I have used the help and see that the syntax is straightforward, but I don't know how I would include the independent variables (age), as in my case, this is what I am trying to find out, ie which age term(s) best describe the data using the fracpoly command. With natural log weight, the best 2 degree fracpoly was with age terms 1 and 2 (fracpoly command didn't converge on raw scale), but if I put these in the box cox, they are based on natural logged data, which is the thing I am doubting.
>>>
>>> Generally, the advise on this list is not transform the 
>>> dependent/explained/response/left-hand-side/y variable but to use a 
>>> log-link function instead. See:
>>> <http://blog.stata.com/2011/08/22/use-poisson-rather-than-regress-te
>>> ll
>>> -a-friend/>
>>>
>>> Your real problem problem appears to be the combination of 
>>> -fracpoly- and -boxcox-, which is not allowed. You can use either 
>>> -glm- or
>>> -poisson- with -fracpoly-, thus solving your problem.
>>>
>>> -- Maarten
>>>
>>> ---------------------------------
>>> 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/
>>
>>
>>
>> --
>> JVVerkuilen, PhD
>> jvverkuilen@gmail.com
>>
>> "It is like a finger pointing away to the moon. Do not concentrate on 
>> the finger or you will miss all that heavenly glory." --Bruce Lee, 
>> Enter the Dragon (1973)
>>
>> *
>> *   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/
>
>
>
> --
> ---------------------------------
> 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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index