You can try dissecting the output of
VarCorr(ggg)
but, once again, I can't guarantee that it's what you want because we
can't fit your model, and you have not sent us a simple, reproducible
example.
Andrew
On Tue, May 30, 2006 at 03:37:19AM -0700, Pryseley Assam
wrote:> Dear R-Users
>
> I have a problem accessing some values in the output from the summary of
an lme fit.
>
> I fit the model below:
>
> ggg <- lme (ST~ -1 + as.factor(endp):Z.sas + as.factor(endp),
data=dat4a,
> random=~-1 + as.factor(endp) + as.factor(endp):Z.sas|as.factor(trials),
> correlation = corSymm(form=~1|as.factor(trials)/as.factor(id)),
weights=varIdent(form=~1|endp))
>
> hh <- summary(ggg)
> hh
>
> Below is the following part of the output of interest:
>
> Correlation Structure: General
> Formula: ~1 | as.factor(trials)/as.factor(id)
> Parameter estimate(s):
> Correlation:
> 1
> 2 0.785
> Variance function:
> Structure: Different standard deviations per stratum
> Formula: ~1 | endp
> Parameter estimates:
> -1 1
> 1.0000000 0.9692405
>
> I wish to access the value of the correlation (0.785) and the vector of
the variance function estimates (1,0.969). I know these can be done throught the
intervals function, but sometimes when the estimated Hessian matrix is not
positive definite or something like that (i am not quite sure), the intervals
function delivers an error message.
>
> Thus, i will like to ask if there is another way to access these values.
I tried using the following code:
>
> hh$modelStruct$corStruct[1]
> hh$modelStruct$varStruct[1]
>
> Rather the output was:
>
> > hh$modelStruct$corStruct[1]
> [1] -1.308580
> > hh$modelStruct$varStruct[1]
> [1] -0.03124255
>
> I presume there is a way to calculate the correlation and variance
function coefficients using these values.
>
> Could someone tell me how to access those values (without using the
intervals function) or better still how to calculate the values from the last
output values.
>
> Kind regards
> Pryseley
>
>
>
>
> ---------------------------------
>
> [[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
--
Andrew Robinson
Department of Mathematics and Statistics Tel: +61-3-8344-9763
University of Melbourne, VIC 3010 Australia Fax: +61-3-8344-4599
Email: a.robinson at ms.unimelb.edu.au http://www.ms.unimelb.edu.au