[R] how calculation degrees freedom

Douglas Bates dmbates at gmail.com
Fri Jan 27 17:06:00 CET 2006


On 1/27/06, gabriela escati peñaloza <gescati at yahoo.com.ar> wrote:
> Hi, I' m having a hard time understanding the computation of degrees of freedom

So do I and I'm one of the authors of the package :-)

> when runing nlme() on the following model:
>
>   > formula(my data.gd)
> dLt ~ Lt | ID
>
>   TasavB<- function(Lt, Linf, K) (K*(Linf-Lt))
>
>   my model.nlme <- nlme (dLt ~ TasavB(Lt, Linf, K),
>   data = my data.gd,
>   fixed = list(Linf ~ 1, K ~ 1),
>   start = list(fixed = c(70, 0.4)),
>   na.action= na.include, naPattern = ~!is.na(dLt))
>
>   > summary(my model.nlme)
> Nonlinear mixed-effects model fit by maximum likelihood
>   Model: dLt ~ TasavB(Lt, Linf, K)
>  Data: my data.gd
>        AIC      BIC    logLik
>   13015.63 13051.57 -6501.814
>   Random effects:
>  Formula: list(Linf ~ 1 , K ~ 1 )
>  Level: ID
>  Structure: General positive-definite
>             StdDev   Corr
>     Linf 7.3625291 Linf
>        K 0.0845886 -0.656
> Residual 1.6967358
>   Fixed effects: list(Linf + K ~ 1)
>         Value Std.Error   DF  t-value p-value
> Linf 69.32748 0.4187314  402 165.5655  <.0001
>    K  0.31424 0.0047690 2549  65.8917  <.0001
>   Standardized Within-Group Residuals:
>       Min         Q1         Med        Q3      Max
>  -3.98674 -0.5338083 -0.02783649 0.5261591 4.750609
>   Number of Observations: 2952
> Number of Groups: 403
> >
>
>   Why are the DF of Linf and K different? I would apreciate if you could point me to a reference

The algorithm is described in Pinheiro and Bates (2000) "Mixed-effects
Models in S and S-PLUS" published by Springer.  See section 2.4.2

I would point out that there is effectively no difference between a
t-distribution with 402 df and a t-distribution with 2549 df so the
actual number of degrees of freedom is irrelevant in this case.  All
you need to know is that it is "large".

I will defer to any of the "degrees of freedom police" who post to
this list to give you an explanation of why there should be different
degrees of freedom.  I have been studying mixed-effects models for
nearly 15 years and I still don't understand.

>   Note: I working with Splus 6.1. for Windows

Technically this email list is for questions about R.  There is
another list, s-news at biostat.wustl.edu, for questions about S-PLUS.

>
>
> Lic. Gabriela Escati Peñaloza
> Biología y Manejo de Recursos Acuáticos
> Centro Nacional Patagónico(CENPAT).
> CONICET
> Bvd. Brown s/nº.
> (U9120ACV)Pto. Madryn
> Chubut
> Argentina
>
> Tel: 54-2965/451301/451024/451375/45401 (Int:277)
> Fax: 54-29657451543
>
> ---------------------------------
>  1GB gratis, Antivirus y Antispam
>  Correo Yahoo!, el mejor correo web del mundo
>  Abrí tu cuenta aquí
>         [[alternative HTML version deleted]]
>
>
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>




More information about the R-help mailing list