[R] How to extract parameter estimates of variance function from lme fit

2010-10-15 Thread Hoai Thu Thai

Dear R-Users,

I have a question concerning extraction of parameter estimates of 
variance function from lme fit.


To fit my simulated data, we use varConstPower ( constant plus power 
variance function).

fm-lme(UPDRS~time,data=data.simula,random=~time,method=ML,weights=varConstPower(fixed=list(power=1)))
I extract the results of this function by using the following codes:
y-summary(fm)
x-y$modelStruct$varStruct
 x
Variance function structure of class varConstPower representing
   constpower
1.184535e-15 1.00e+00

These are the constants and power that apppear in the summary(fm), and 
that I want to extract.

Hower I got different value of const when extracting from x:

 x$const
const
-34.36943

Does anyone know why there is such difference and how to extract the 
expected value (1.184535e-15) ?


Thanks in advance for your help.

Thu


---

THAI Hoai Thu
INSERM U738 - Université Paris 7
16 rue Henri Huchard
75018 Paris, FRANCE
Tel: 01 57 27 75 39
Email: hoai-thu.t...@inserm.fr

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to extract parameter estimates of variance function from lme fit

2010-10-15 Thread Henrique Dallazuanna
Try this:

coef(fm$modelStruct$varStruct, uncons = FALSE)

On Fri, Oct 15, 2010 at 11:42 AM, Hoai Thu Thai hoai-thu.t...@inserm.frwrote:

 Dear R-Users,

 I have a question concerning extraction of parameter estimates of variance
 function from lme fit.

 To fit my simulated data, we use varConstPower ( constant plus power
 variance function).

 fm-lme(UPDRS~time,data=data.simula,random=~time,method=ML,weights=varConstPower(fixed=list(power=1)))
 I extract the results of this function by using the following codes:
 y-summary(fm)
 x-y$modelStruct$varStruct
  x
 Variance function structure of class varConstPower representing
   constpower
 1.184535e-15 1.00e+00

 These are the constants and power that apppear in the summary(fm), and that
 I want to extract.
 Hower I got different value of const when extracting from x:

  x$const
const
 -34.36943

 Does anyone know why there is such difference and how to extract the
 expected value (1.184535e-15) ?

 Thanks in advance for your help.

 Thu


 ---

 THAI Hoai Thu
 INSERM U738 - Université Paris 7
 16 rue Henri Huchard
 75018 Paris, FRANCE
 Tel: 01 57 27 75 39
 Email: hoai-thu.t...@inserm.fr

 __
 R-help@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide
 http://www.R-project.org/posting-guide.html
 and provide commented, minimal, self-contained, reproducible code.




-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40 S 49° 16' 22 O

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] How to extract parameter estimates of variance function from lme fit

2010-10-15 Thread Hoai Thu Thai

Thank you Henrique!! It works.

Thu


Le 15/10/2010 16:53, Henrique Dallazuanna a écrit :

coef(fm$modelStruct$varStruct, uncons = FALSE)


__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.