Skip to content
Prev 16379 / 20628 Next

[FORGED] Re: Question about gls

On 24/03/18 08:58, Andrzej Galecki wrote:

            
Not exactly obvious, but, is it?  How on earth would one ever figure 
this out, except by appealing to r-sig-mixed-models?

Looking at str(fit.gls) one sees that there is a (list) component 
"modelStruct" and that this component in turn has a component 
"corStruct".  If one is an optimist, one might try

     fit.gls$modelStruct$corStruct

which (mirabile dictu!) gives:

Correlation structure of class corAR1 representing
       Phi
0.1748786

Again if one is an optimist, one might try stripping away all the 
unwanted baggage by doing

     as.vector(fit.gls$modelStruct$corStruct)

giving:

[1] 0.3533897

Bingo.

Still it's all pretty obscure.  And typical of the obfuscation that 
results from using S4 classes and methods.

cheers,

Rolf