[R-sig-ME] using weights=varIdent in lme: how to change, reference level of grouping factor?

Highland Statistics Ltd highstat at highstat.com
Sun Jul 21 12:14:05 CEST 2013


>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 18 Jul 2013 02:22:46 +0000 (UTC)
> From: Emma <emma_knight at ymail.com>
> To: r-sig-mixed-models at r-project.org
> Subject: Re: [R-sig-ME] using weights=varIdent in lme: how to change
> 	reference	level of grouping factor?
> Message-ID: <loom.20130718T042202-402 at post.gmane.org>
> Content-Type: text/plain; charset=us-ascii
>
> Ben Bolker <bbolker at ...> writes:
>
>>    I have spent some time delving through the guts of lme()
>> but haven't figured it out yet.  I'm somewhat baffled,
>> as the default order of factor() should be Female, Male in
>> any case, so I don't see where the order could be getting
>> messed up.
>>
>>
>
> Hi Ben,
> Thanks for having a look at this.
> I think lme is using the category with the largest number of observations as
> the reference level.

Emma...that seems a sensible choice from the original programmer of 
gls/lme. The same approach is recommended if you use a categorical 
variable as covariate; use the the level with the largest number of 
observations as baseline; it reduces collinearity between the dummy 
variables. I guess that with a varIdent setting in gls/lme there are 
similar numerical advantages to use the level with the largest number of 
observations as baseline.

I missed the start of this thread...why do you want to change the 
baseline level in the first instance? It is not that the estimated s_j 
values are 'with respect to a baseline level'. You can just calculate 
s_j * estimated sigma for each level j. There is no need to change the 
baseline level (unless you have numerical optimisation problems).

Mind you....you can easily write some code for this in JAGS and then you 
can choose any level as baseline!


Kind regards,

Alain



More information about the R-sig-mixed-models mailing list