lambda.find.wgee.mean {ELCIC}R Documentation

Calculate the tuning parameters involved in marginal mean selection under WGEE with data missing at random

Description

This function provides an efficient algorithm to calculate the tuning parameters involved in marginal mean selection under WGEE with data missing at random.

Usage

lambda.find.wgee.mean(y,x,r,pi,id,time,beta,rho,phi,dist,corstr)

Arguments

y

A vector containing outcomes. use NA to indicate missing outcomes.

x

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

r

A vector indicating the observation of outcomes: 1 for observed records, and 0 for unobserved records.

pi

A vector containing observing probabilities across all observations.

id

A vector indicating subject id.

time

The number of observations for each subject

beta

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

rho

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

phi

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

dist

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

corstr

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

Value

Tuning parameter values.

Note

corstr should be prespecified.

Examples

## tests
# load data
data(wgeesimdata)
library(wgeesel)
data_wgee<-data.frame(do.call(cbind,wgeesimdata))
corstr<-"exchangeable"
dist<-"binomial"
id<-data_wgee$id
# obtain the estimates
fit<-wgee(y~x1+x2+x3,data_wgee,id,family=dist,corstr =corstr,scale = NULL,
         mismodel =obs_ind~x_mis1)
beta<-as.vector(summary(fit)$beta)
rho<-summary(fit)$corr
phi<-summary(fit)$phi
#calculate observing probabilies for all observations
gamma<-as.vector(summary(fit$mis_fit)$coefficients[,1])
x_mis<-wgeesimdata$x_mis
pi<-cond.prob(x_mis,gamma,id,time=3)
lambda<-lambda.find.wgee.mean(y=wgeesimdata$y,x=wgeesimdata$x,r=wgeesimdata$obs_ind,
pi=pi,id=wgeesimdata$id,time=3,beta=beta,rho=rho,phi=phi,dist=dist,corstr=corstr)
lambda


[Package ELCIC version 0.2.1 Index]