This function aims to efficiently calculate the tuning parameter lambda in ELCIC.
Usage
lambda.find.glm(x, y, beta, dist)
Arguments
- x
A matrix containing covariates. The first column should contain all ones corresponding to the intercept.
- y
A vector containing outcomes.
- beta
A plug-in estimator solved by an external estimating procedure.
- dist
A specified distribution. It can be "gaussian", "poisson",and "binomial".
Value
A value of lambda (tuning parameter) vector involved in the empirical likelihood.
Note
All "x" and "y" should be observed.
Examples
## tests
# load data
data(glmsimdata)
x<-glmsimdata$x
y<-glmsimdata$y
# obtain the estimates
fit<-glm(y~x-1,family="poisson")
beta<-fit$coefficients
lambda<-lambda.find.glm(x, y, beta, dist="poisson")
lambda
#> [1] 0 0 0 0