Hoai Thu Thai
2010-Oct-15 14:42 UTC
[R] How to extract parameter estimates of variance function from lme fit
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 const power 1.184535e-15 1.000000e+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.thai at inserm.fr
Henrique Dallazuanna
2010-Oct-15 14:53 UTC
[R] How to extract parameter estimates of variance function from lme fit
Try this: coef(fm$modelStruct$varStruct, uncons = FALSE) On Fri, Oct 15, 2010 at 11:42 AM, Hoai Thu Thai <hoai-thu.thai@inserm.fr>wrote:> 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 > const power > 1.184535e-15 1.000000e+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.thai@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]]
Possibly Parallel Threads
- trouble with extraction/interpretation of variance structure para meters from a model built using gnls and varConstPower
- nonpos. def. var-cov matrix
- Network meta-analysis, varConstPower in nlme
- trouble with extraction/interpretation of variance struct ure para meters from a model built using gnls and varConstPower
- Proper syntax for using varConstPower in nlme