Learn R Programming

MIIPW (version 0.1.2)

lmemeanscore: Fits a marginal model using meanscore

Description

provides meanscore estimates of parameters for semiparametric marginal model of response variable of interest. The augmented terms are estimated by using multiple imputation model.

Usage

lmemeanscore(
  data,
  M = 5,
  id,
  analysis.model,
  imp.model,
  qpoints = 4,
  psiCov,
  psi,
  sigma = NULL,
  sigmaMiss,
  dist,
  link,
  conv = 1e-04,
  maxiter,
  maxpiinv = -1,
  se = TRUE,
  verbose = FALSE
)

Value

A list of objects containing the following objects

Call

details about arguments passed in the function

nr.conv

logical for checking convergence in Newton Raphson algorithm

nr.iter

number of iteration required

nr.diff

absolute difference for roots of Newton Raphson algorithm

beta

estimated regression coefficient for the analysis model

var.beta

Asymptotic SE for beta

Arguments

data

longitudinal data with each subject specified discretely

M

number of imputation to be used in the estimation of augmentation term

id

cloumn names which shows identification number for each subject

analysis.model

A formula to be used as analysis model

imp.model

For for missing response imputation, which consider subject specific random intercept

qpoints

Number of quadrature points to be used while evaluating the numerical integration

psiCov

working model parameter

psi

working model parameter

sigma

working model parameter

sigmaMiss

working model parameter

dist

distribution for imputation model. Currently available options are Gaussian, Binomial

link

Link function for the mean

conv

convergence tolerance

maxiter

maximum number of iteration

maxpiinv

maximum value pi can take

se

Logical for Asymptotic SE for regression coefficient of the regression model.

verbose

logical argument

Author

Atanu Bhattacharjee, Bhrigu Kumar Rajbongshi and Gajendra Kumar Vishwakarma

Details

lmemeanscore

It uses the mean score method to reduce the bias due to missing values in response model for longitudinal data.The response variable \(\mathbf{Y}\) is related to the coariates as \(g(\mu)=\mathbf{X}\beta\), where g is the link function for the glm. The estimating equation is $$\sum_{i=1}^{n}\sum_{j=t_1}^{t_k}\int_{b_i}(\delta_{ij}S(Y_{ij},\mathbf{X}_{ij})+(1-\delta_{ij})\phi(\mathbf{V}_{ij},b_i;\psi))db_i=0$$ where \(\delta_{ij}=1\) if there is missing value in response and 0 otherwise, \(\mathbf{X}\) is fully observed all subjects and \(\mathbf{V}_{ij}=(\mathbf{X}_{ij},A_{ij})\). The missing score function values due to incomplete data are estimated using an imputation model through mice which we have considered as $$Y_{ij}|b_i\sim N(\mathbf{V}_{ij}\gamma+b_i,\sigma)\; ; b_i\sim N(0,\sigma_{miss})$$ through multiple imputation.

References

Wang, C. Y., Shen-Ming Lee, and Edward C. Chao. "Numerical equivalence of imputing scores and weighted estimators in regression analysis with missing covariates." Biostatistics 8.2 (2007): 468-473.

Seaman, Shaun R., and Stijn Vansteelandt. "Introduction to double robust methods for incomplete data." Statistical science: a review journal of the Institute of Mathematical Statistics 33.2 (2018): 184.

Vansteelandt, Stijn, James Carpenter, and Michael G. Kenward. "Analysis of incomplete data using inverse probability weighting and doubly robust estimators." Methodology: European Journal of Research Methods for the Behavioral and Social Sciences 6.1 (2010): 37.

See Also

SIPW,miSIPW,miAIPW

Examples

Run this code
 if (FALSE) {
##
library(JMbayes2)
library(lme4)
library(insight)
library(numDeriv)
library(stats)
lmer(log(alkaline)~drug+age+year+(1|id),data=na.omit(pbc2))
data1<-pbc2
data1$alkaline<-log(data1$alkaline)
names(pbc2)
apply(pbc2,2,function(x){sum(is.na(x))})
r.ij<-ifelse(is.na(data1$alkaline)==T,0,1)
data1<-cbind.data.frame(data1,r.ij)
data1$drug<-factor(data1$drug,levels=c("placebo","D-penicil"),labels = c(0,1))
data1$sex<-factor(data1$sex,levels=c('male','female'),labels=c(1,0))
data1$drug<-as.numeric(as.character(data1$drug))
data1$sex<-as.numeric(as.character(data1$sex))
model.y<-lmer(alkaline~year+age+sex+drug+serBilir+(1|id),data=na.omit(data1))
psi<-model.y@beta
sigma<-get_variance_residual(model.y)
sigmaMiss<-get_variance(model.y)$var.random
m11<-lmemeanscore(data=data1,id='id',
analysis.model = alkaline~year,
imp.model = ~year+age+sex+drug+serBilir+(1|id),
psiCov = vcov(model.y),psi=psi,
sigma=sigma,sigmaMiss=sigmaMiss,dist='gaussian',link='identity',qpoints = 4,
maxiter = 200)
m11
##
}

Run the code above in your browser using DataLab