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]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to