Learn R Programming

ELCIC (version 0.2.1)

lambda.find.glm: To calculate tuning parameter involved in ELCIC under GLM

Description

This function aims to efficiently calculate the tuning parameter lambda in ELCIC.

Usage

lambda.find.glm(x, y, beta, dist)

Value

A value of lambda (tuning parameter) vector involved in the empirical likelihood.

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".

Examples

Run this code
## 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

Run the code above in your browser using DataLab