Learn R Programming

mpath (version 0.3-7)

estfunReg: Extract Empirical First Derivative of Log-likelihood Function

Description

Generic function for extracting the empirical first derivative of log-likelihood function of a fitted regularized model.

Usage

estfunReg(x, …)

Arguments

x

a fitted model object.

arguments passed to methods.

Value

A matrix containing the empirical first derivative of log-likelihood functions. Typically, this should be an \(n \times k\) matrix corresponding to \(n\) observations and \(k\) parameters. The columns should be named as in coef or terms, respectively.

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

zipath

Examples

Run this code
# NOT RUN {
data("bioChemists", package = "pscl")
fm_zinb <- zipath(art ~ . | ., data = bioChemists, family = "negbin", nlambda=10)
res <- estfunReg(fm_zinb, which=which.min(fm_zinb$bic))
# }

Run the code above in your browser using DataLab