| vcov.scam | R Documentation |
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.
## S3 method for class 'scam'
vcov(object, freq = FALSE, untransformed=FALSE, ...)
object |
fitted model object of class |
freq |
|
untransformed |
if |
... |
other arguments, currently ignored. |
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).
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.
Natalya Pya <nat.pya@gmail.com>
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
scam
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))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.