vcov.scam: Parameter estimator covariance matrix from SCAM fit

View source: R/scam.r

vcov.scamR Documentation

Parameter estimator covariance matrix from SCAM fit

Description

Extracts, from a fitted scam object, either the Bayesian posterior covariance matrix of the transformed parameters (a mix of exponentiated and un-exponentiated parameters) or the frequentist covariance matrix of the parameter estimators.

Usage

## S3 method for class 'scam'
vcov(object, freq = FALSE, untransformed=FALSE, ...)

Arguments

object

fitted model object of class scam as produced by scam().

freq

TRUE to return the frequentist covariance matrix of the (transformed or untransformed) parameter estimators, FALSE to return the Bayesian posterior covariance matrix of the parameters.

untransformed

if TRUE then the covariance matrix of the untransformed parameters is returned.

...

other arguments, currently ignored.

Details

Extracts, from a fitted scam object, the Bayesian posterior covariance matrix of the transformed parameters (default; object$Vp.t), the frequentist covariance matrix of the transformed parameters (object$Ve.t), or the covariance matrix of the untransformed parameters (object$Vp for Bayesian and object$Ve for frequentist inference).

Value

A matrix corresponding to the estimated posterior covariance matrix of the (un)transformed model parameter estimators/coefficients, or the estimated frequentist covariance matrix of the parameters, depending on the arguments freq and unstransformed.

Author(s)

Natalya Pya <nat.pya@gmail.com>

References

Wood, S.N. (2017) Generalized Additive Models: An Introductio with R (2nd ed) CRC Press

Pya, N. and Wood, S.N. (2015) Shape constrained additive models. Statistics and Computing, 25(3), 543-559

See Also

scam

Examples

 
require(scam)
set.seed(2)
n <- 200
x <- runif(n)*4-1;
y <- exp(4*x)/(1+exp(4*x)) +rnorm(n)*.2
m <- scam(y~s(x,bs="mpi"))
diag(vcov(m))


scam documentation built on Jan. 22, 2026, 5:07 p.m.