sp.vcov: Extract smoothing parameter estimator covariance matrix from (RE)ML GAM fit
Description
Extracts the estimated covariance matrix for the log smoothing parameter
estimates from a (RE)ML estimated gam object, provided the fit was with a method
that evaluated the required Hessian.
Usage
sp.vcov(x,edge.correct=TRUE,reg=1e-3)
Value
A matrix corresponding to the estimated covariance matrix of the log smoothing parameter estimators,
if this can be extracted, otherwise NULL. If the scale parameter has been (RE)ML estimated (i.e. if the method was "ML" or "REML" and the scale parameter was unknown) then the
last row and column relate to the log scale parameter. If edge.correct=TRUE and this was used in fitting then the edge corrected smoothing parameters are in attribute lsp of the returned matrix.
Arguments
x
a fitted model object of class gam as produced by gam().
edge.correct
if the model was fitted with edge.correct=TRUE (see gam.control), then thereturned covariance matrix will be for the edge corrected log smoothing parameters.
reg
regularizer for Hessian - default is equivalent to prior variance of 1000 on log smoothing parameters.
Just extracts the inverse of the hessian matrix of the negative (restricted) log likelihood w.r.t
the log smoothing parameters, if this has been obtained as part of fitting.
References
Wood, S.N., N. Pya and B. Saefken (2016), Smoothing parameter and
model selection for general smooth models (with discussion).
Journal of the American Statistical Association 111, 1548-1575
tools:::Rd_expr_doi("10.1080/01621459.2016.1180986")