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: centred mean age


From   Thomas Norris <T.Norris2@lboro.ac.uk>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: centred mean age
Date   Thu, 31 Jan 2013 09:44:00 +0000

Nick,

Weight is actually on the log scale ( ln(weight) ), not kilograms, as it showed increasing variability with age. This wouldn't have an effect, would it?
	
Thanks,

Tom

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
Sent: 31 January 2013 09:38
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: centred mean age

It is difficult to give really good advice without being able to look at the data, but  it seems unusual to me that a cubic polynomial outperforms competitors. Independently of your main issues I'd advise a change of units of measurement if only to ease presentation (e.g.
kilograms to grams).

Very generally, instability of coefficients often signals possible over-fitting.

Nick

On Thu, Jan 31, 2013 at 9:13 AM, Thomas Norris <T.Norris2@lboro.ac.uk> wrote:
> Dear Nick, Rich and David and statalisters,
>
> Thank you very much for your advice. If I may clarify just so I can progress without doubt. I found that the best fitting multilevel model for my prenatal weight dataset was a cubic polynomial (tried fracpolys and spline). I then decided to centre the age term as it is not intuitive to have an intercept at 0 as, in prenatal life,  there should be nothing at zero.
>
> I have created a dummy variable for ethnicity, to see if there are differences between two ethnic groups, and interacted this with age (pakage, pakage2,pakeage3) and centred age (in the centred model).
>
> The coefficients in the uncentred model were:
> Age: 0.256372
> Age2: -0.0009669
> Age3= -0.0000291
> Pak= -0.5843112
> Pakage= 0.0617149
> Pakage2= -0.0021505
> Pakage3= 0.0000234
>
> In the uncentred model:
> Age: 0.1062287
> Age2: -0.0037464
> Age3= -0.0000291
> Pak= -0.0427686
> Pakage= -0.0039254
> Pakage2= 0.0000899
> Pakage3= 0.0000234
>
> As people have since told me, it is fine that the coefficients change value after the centreing, but the interactions between age and age2 and ethnicity have switched from positive to negative and vice versa, after centreing. Is this what one would expect?
>
> Many thanks,
>
> Tom
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu 
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
> Sent: 30 January 2013 20:38
> To: statalist@hsphsun2.harvard.edu
> Subject: Re: st: centred mean age
>
> Please show us what is troubling you. (See the Statalist FAQ for 
> advice on giving detailed, precise information.)
>
> Nick
>
> On Wed, Jan 30, 2013 at 8:32 PM,  <t.norris2@lboro.ac.uk> wrote:
>> Hi Nick,
>>
>> Thank you for you reply.
>>
>> I was under the impression that the age coefficients in a centred model shouldn't be different to an uncentred model though, and mine change.
>>
>> Is this change therefore ok?
>>
>> Thank you,
>>
>> Tom
>>
>>
>> Sent using BlackBerry® from Orange
>>
>> -----Original Message-----
>> From: Nick Cox <njcoxstata@gmail.com>
>> Sender: <owner-statalist@hsphsun2.harvard.edu>
>> Date: Wed, 30 Jan 2013 20:20:48
>> To: <statalist@hsphsun2.harvard.edu>
>> Reply-To: <statalist@hsphsun2.harvard.edu>
>> Subject: Re: st: centred mean age
>>
>> Whether or not it helps in your model, I see no problem in what you 
>> describe. It's the way that linear, quadratic and cubic terms work 
>> together in a model that's important.
>>
>> All that said, there are quite possibly better ways of doing what you 
>> want, such as cubic splines or fractional polynomials, which are well 
>> supported in Stata.
>>
>> Nick
>>
>> On Wed, Jan 30, 2013 at 7:08 PM, Thomas Norris <T.Norris2@lboro.ac.uk> wrote:
>>
>>> I am having trouble with centering my independent variable (age) in a cubic polynomial.
>>>
>>> I have generated the centred age by using gen centrage= age-r(mean) 
>>> and then to get the centred quadratic and cubic I simple raise 
>>> centrage to ^2 and ^3 respectively (gen centrage2= centrage^2)(gen
>>> gentrage3=centrage^3)
>>>
>>> However, the negative centred age terms (ie those smaller than the mean) become positive when squaring them, which is what is mathematically correct, but it doesn't help my models.
>>>
>>> If for example the mean was 30 weeks and I had 2 separate obs, one at 25 weeks and one at 35 weeks, the centred age would be -5 and 5, but the centred age^2 are both 25.

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