Skip to content
Prev 96012 / 398500 Next

Extracting Phi from gls/lme

John Logsdon <j.logsdon at quantex-research.com> writes:
Works for me. Is there a rogue coef() around?? Or did you misspell
"unconstrained" and not tell us?
[1] 0.1171201
Phi
0.05849318
Obvious is in the eyes of the beholder, but:
[1] -0.1996813
I don't think they do anything, but their print methods call
print.corStruct which calls coef.corAR1. And
A single object matching coef.corAR1 was found
It was found in the following places
  registered S3 method for coef from namespace nlme
  namespace:nlme
with value

function (object, unconstrained = TRUE, ...)
{
    if (unconstrained) {
        if (attr(object, "fixed")) {
            return(numeric(0))
        }
        else {
            return(as.vector(object))
        }
    }
    aux <- exp(as.vector(object))
    aux <- c((aux - 1)/(aux + 1))
    names(aux) <- "Phi"
    aux
}
<environment: namespace:nlme>