Free Access Week - Data Engineering + BI
Data Engineering and BI courses are free this week!
Free Access Week - Jun 2-8

isni (version 0.1)

isnilmm: Function for ISNI computation when the outcome follows LMM.

Description

Calculate the ISNI when the regression outcome is subject to missingness and follows linear mixed-effects models (LMMs)

Usage

isnilmm(ymfix, ymran, gmodel, predprobobs = NULL, misni = FALSE, alldata)

Arguments

ymfix

an object of class "formula": a two-sided linear formula description of the fixed-effects part of the model to be fitted for the outcome

ymran

an object of class "formula": an one-sided linear formula description of the random-effects part of the model to be fitted for the outcome

gmodel

an object of class "formula": a symbolic description of the selection model to be fitted for the missingness indictor g

predprobobs

Null if using buil-in multinomial transitional logistic model to obtain predicted probabilities of being observed; otherwise user supply a vector of these probabilities for all the observations in alldata.

misni

FALSE if using the default approach to computing ISNI with a scalar nonignorability parameter; TRUE when computing ISNI with multiple nonignorability parameters.

alldata

the name of data frame containing all the variables in the model and all the observations including those intended to be collected but became missing.

Examples

Run this code
# NOT RUN {
data(qolef)
qolef$t12<-qolef$t1*qolef$group
qolef$t32<-qolef$t3*qolef$group
qolef$t62<-qolef$t6*qolef$group
ymfix=y~   t1+t3+t6 + group  + t12 + t32+t62 + perf + sever
gmodel=factor(g)~ group+factor(time)+yp+perf+sever
ymran=~1|id

##Random intercept model
result=isnilmm(ymfix,ymran, gmodel, alldata=qolef)
summary(result)

# }

Run the code above in your browser using DataLab