Last chance! 50% off unlimited learning
Sale ends in
Obtains Bayesian parameter covariance matrix, frequentist
parameter estimator covariance matrix, estimated degrees of
freedom for each parameter and leading diagonal of influence/hat matrix,
for a penalized regression estimated by magic
.
magic.post.proc(X,object,w=NULL)
is the model matrix.
is the list returned by magic
after fitting the
model with model matrix X
.
is the weight vector used in fitting, or the weight matrix used
in fitting (i.e. supplied to magic
, if one was.). If w
is a vector then its
elements are typically proportional to reciprocal variances (but could even be negative).
If w
is a matrix then
t(w)%*%w
should typically give
the inverse of the covariance matrix of the response data supplied to magic
.
A list with three items:
the Bayesian covariance matrix of the model parameters.
the frequentist covariance matrix for the parameter estimators.
the leading diagonal of the hat (influence) matrix.
the array giving the estimated degrees of freedom associated with each parameter.
object
contains rV
(scale
(w
or the matrix diag(w)
. The
hat/influence matrix is given by
The frequentist parameter estimator covariance matrix is