lmeaipw | R Documentation |
provides augmented inverse probability weighted estimates of parameters for semiparametric marginal model of response variable of interest. The augmented terms are estimated by using multiple imputation model.
lmeaipw(
data,
M = 5,
id,
analysis.model,
wgt.model,
imp.model,
qpoints = 4,
psiCov,
nu,
psi,
sigma = NULL,
sigmaMiss,
sigmaR,
dist,
link,
conv = 1e-04,
maxiter,
maxpiinv = -1,
se = TRUE,
verbose = FALSE
)
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 |
wgt.model |
Formula for weight model, which consider subject specific random intercept |
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 |
nu |
working model parameter |
psi |
working model parameter |
sigma |
working model parameter |
sigmaMiss |
working model parameter |
sigmaR |
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 |
lmeaipw
It uses the augmented inverse probability weighted 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_{a_i}\int_{b_i}(\frac{\delta_{ij}}{\hat\pi_{ij}(a_i)}S(Y_{ij},\mathbf{X}_{ij};\beta)+(1-\frac{\delta_{ij}}{\hat\pi_{ij}(a_i)})\phi(\mathbf{V}_{ij},b_i;\psi))da_idb_i=0
where \delta_{ij}=1
if there is missing value in the response and 0 otherwise,
\mathbf{X}
is fully observed all subjects,
where \mathbf{V}_{ij}=(\mathbf{X}_{ij},A_{ij})
. The missing score function values due to incomplete data are estimated
using an imputation model through FCS (here we have considered a mixed effect model) which we have considered as \phi(\mathbf{V}_{ij}=\mathbf{v}_{ij}))
. The estimated value \hat{\phi}(\mathbf{V}_{ij}=\mathbf{v}_{ij}))
is obtained
through multiple imputation. The working model for imputation of missing response is
Y_{ij}|b_i\sim N(\mathbf{V}_{ij}\psi+b_i,\sigma)\; ; b_i\sim N(0,\sigma_{miss})
and for the missing data probability
Logit(P(\delta_{ij}=1|\mathbf{V}_{ij}\nu+a_i))\;;a_i\sim N(0,\sigma_R)
A list of objects containing the following objects
details about arguments passed in the function
logical for checking convergence in Newton Raphson algorithm
number of iteration required
absolute difference for roots of Newton Raphson algorithm
estimated regression coefficient for the analysis model
Asymptotic SE for beta
Atanu Bhattacharjee, Bhrigu Kumar Rajbongshi and Gajendra Kumar Vishwakarma
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.
SIPW,miSIPW,miAIPW
## Not run:
##
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))
r.ij~year+age+sex+drug+serBilir+(1|id)
model.r<-glmer(r.ij~year+age+sex+drug+serBilir+(1|id),family=binomial(link='logit'),data=data1)
model.y<-lmer(alkaline~year+age+sex+drug+serBilir+(1|id),data=na.omit(data1))
nu<-model.r@beta
psi<-model.y@beta
sigma<-get_variance_residual(model.y)
sigmaR<-get_variance(model.r)$var.random
sigmaMiss<-get_variance(model.y)$var.random
m11<-lmeaipw(data=data1,id='id',
analysis.model = alkaline~year,
wgt.model=~year+age+sex+drug+serBilir+(1|id),
imp.model = ~year+age+sex+drug+serBilir+(1|id),
psiCov = vcov(model.y),nu=nu,psi=psi,
sigma=sigma,sigmaMiss=sigmaMiss,sigmaR=sigmaR,dist='gaussian',link='identity',
maxiter = 200)
m11
##
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.