Learn R Programming

mpath (version 0.4-2.26)

sandwichReg: Making Sandwiches with Bread and Meat for Regularized Estimators

Description

Constructing sandwich covariance matrix estimators by multiplying bread and meat matrices for regularized regression parameters.

Usage

sandwichReg(x, breadreg.=breadReg, meatreg.=meatReg, which, log=FALSE, ...)

Value

A matrix containing the sandwich covariance matrix estimate for the non-zero parameters.

Arguments

x

a fitted model object.

breadreg.

either a breadReg matrix or a function for computing this via breadreg.(x).

meatreg.

either a breadReg matrix or a function for computing this via meatreg.(x, ...).

which

which penalty parameters(s) to compute?

log

if TRUE, the corresponding element is with respect to log(theta) in negative binomial regression. Otherwise, for theta

...

arguments passed to the meatReg function.

Author

Zhu Wang <zwang145@uthsc.edu>

Details

sandwichReg is a function to compute an estimator for the covariance of the non-zero parameters. It takes a breadReg matrix (i.e., estimator of the expectation of the negative derivative of the penalized estimating functions) and a meatReg matrix (i.e., estimator of the variance of the log-likelihood function) and multiplies them to a sandwich with meat between two slices of bread. By default breadReg and meatReg are called. Implemented only for zipath object with family="negbin" in the current version.

References

Zhu Wang, Shuangge Ma and Ching-Yun Wang (2015) Variable selection for zero-inflated and overdispersed data with application to health care demand in Germany, Biometrical Journal. 57(5):867-84.

See Also

breadReg, meatReg

Examples

Run this code
data("bioChemists", package = "pscl")
fm_zinb <- zipath(art ~ . | ., data = bioChemists, family = "negbin", nlambda=10, maxit.em=1)
sandwichReg(fm_zinb, which=which.min(fm_zinb$bic))

Run the code above in your browser using DataLab