vcov.gam {mgcv} | R Documentation |
Extracts the Bayesian posterior covariance matrix of the
parameters or frequentist covariance matrix of the parameter estimators
from a fitted gam
object.
vcov.gam(object, freq = TRUE, dispersion = NULL, ...)
object |
fitted model object of class gam as produced by gam() . |
freq |
TRUE to return the frequentist covariance matrix of the
parameter estimators, FALSE to return the Bayesian posterior covariance
matrix of the parameters. |
dispersion |
a value for the dispersion parameter: not normally used. |
... |
other arguments, currently ignored. |
Basically, just extracts object$Ve
or object$Vp
from a gamObject
.
A matrix corresponding to the estimated frequentist covariance matrix
of the model parameter estimators/coefficients, or the estimated posterior
covariance matrix of the parameters, depending on the argument freq
.
Henric Nilsson. Maintained by Simon N. Wood simon.wood@r-project.org
n <- 100 x <- runif(n) y <- sin(x*2*pi) + rnorm(n)*.2 mod <- gam(y~s(x,bs="cc",k=10),knots=list(x=seq(0,1,length=10))) diag(vcov(mod))