ee.glm: Estimating equation for ELCIC under GLM

ee.glmR Documentation

Estimating equation for ELCIC under GLM

Description

A specified estimating equation for ELCIC under GLM. This estimating equation is used for marginal mean selection.

Usage

ee.glm(x, y, beta, dist)

Arguments

x

A matrix containing covariates. The first column should be all ones corresponding to the intercept. See more details in

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 matrix containing values of calculated estimating equations.

Note

"x" and "y" should be all observed.

Examples

## tests
# load data
data(glmsimdata)
x<-glmsimdata$x
y<-glmsimdata$y
# obtain the estimates. Note that x matrix already contains intercept.
fit<-glm(y~x-1,family="poisson")
beta<-fit$coefficients
ee.matrix<-ee.glm(x, y, beta, dist="poisson")
apply(ee.matrix,1,mean)


ELCIC documentation built on Feb. 16, 2023, 7:18 p.m.