lambda.find.gee: Calculate the tuning parameters involved in ELCIC under GEE

View source: R/lambda.R

lambda.find.geeR Documentation

Calculate the tuning parameters involved in ELCIC under GEE

Description

This function provides an efficient algorithm to calculate the tuning parameters involved in ELCIC under GEE.

Usage

lambda.find.gee(x, y, id, beta, r, dist, rho, phi, corstr)

Arguments

x

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

y

A vector containing outcomes.

id

A vector indicating subject id.

beta

A plug-in estimator solved by an external estimation procedure, such as GEE.

r

A vector indicating the observation of outcomes: 1 for observed records, and 0 for unobserved records. The default setup is that all data are observed. See more in details section.

dist

A specified distribution. It can be "gaussian", "poisson",and "binomial".

rho

A correlation coefficients obtained from an external estimation procedure, such as GEE.

phi

An over-dispersion parameter obtained from an external estimation procedure, such as GEE.

corstr

A candidate correlation structure. It can be "independence","exchangeable", and "ar1".

Details

If the element in argument "r" equals zero, the corresponding rows of "x" and "y" should be all zeros.

Value

Tuning parameter values.

Examples

## tests
# load data
data(geesimdata)
x<-geesimdata$x
y<-geesimdata$y
id<-geesimdata$id
corstr<-"exchangeable"
dist<-"poisson"
# obtain the estimates
library(geepack)
fit<-geeglm(y~x-1,data=geesimdata,family =dist,id=id,corstr = corstr)
beta<-fit$coefficients
rho<-unlist(summary(fit)$corr[1])
phi<-unlist(summary(fit)$dispersion[1])
r=rep(1,nrow(x))
lambda<-lambda.find.gee(x,y,id,beta,r,dist,rho,phi,corstr)
lambda


ELCIC documentation built on March 18, 2022, 7:47 p.m.