The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
This is a vignette for our package ‘MIIPW’. It contains function for fitting GEE model for repeated measurement data. We have included mainly five function
We have included a repeated measured gene expression data in our package. Models are fitted to the dataset available in our package as below.
library(MIIPW)
data("srdata1")
head(srdata1)
#> ID Visit C6kine ActivinRIB ActivinRIIA ActivinRIIAB Adiponectin AgRP
#> 5 2 1 1543.212 589.8966 277.3228 20377.32 10834.171 389.7555
#> 6 2 2 2130.282 820.4673 390.4100 38432.00 18354.472 560.1543
#> 7 2 4 1444.763 833.0092 459.7626 16478.16 8141.389 373.6979
#> 8 2 5 2661.616 860.1184 355.3753 26138.09 21286.228 506.2943
#> 9 3 1 2064.330 532.0388 435.7554 25176.20 7440.891 605.6970
#> 10 3 2 2341.346 579.0088 375.4292 24950.24 10418.850 608.5809
#> ALCAM
#> 5 77.70429
#> 6 63.06272
#> 7 NA
#> 8 54.20246
#> 9 66.67085
#> 10 71.75843
apply(srdata1,2,anyNA)
#> ID Visit C6kine ActivinRIB ActivinRIIA ActivinRIIAB
#> FALSE FALSE TRUE TRUE TRUE FALSE
#> Adiponectin AgRP ALCAM
#> TRUE TRUE TRUE
::md.pattern(srdata1[,-c(1,2)],plot = TRUE) mice
#> ActivinRIIAB ActivinRIB ActivinRIIA Adiponectin AgRP C6kine ALCAM
#> 124 1 1 1 1 1 1 1 0
#> 8 1 1 1 1 1 1 0 1
#> 9 1 1 1 1 1 0 1 1
#> 1 1 1 1 1 1 0 0 2
#> 5 1 1 1 1 0 1 1 1
#> 6 1 1 1 0 1 1 1 1
#> 1 1 1 1 0 1 1 0 2
#> 1 1 1 1 0 0 1 1 2
#> 4 1 1 0 1 1 1 1 1
#> 1 1 1 0 1 0 1 1 2
#> 1 1 1 0 0 0 1 1 3
#> 2 1 0 1 1 1 1 1 1
#> 1 1 0 0 1 0 1 1 3
#> 0 3 7 9 9 10 10 48
Here we have considered the response model for C6kine, depending on the other covariates in dataset srdata1. Formula object below defines the model struture. Imputation model for the methods described in can be specified through the predictor matrix function available in mice package.
<-C6kine~ActivinRIB+ActivinRIIA+ActivinRIIAB+Adiponectin+AgRP+ALCAM
formula<-mice::make.predictorMatrix(srdata1[names(srdata1)%in%all.vars(formula)])
pMat<-MeanScore(data=srdata1,
m1<-formula,id='ID',
formulavisit='Visit',family='gaussian',init.beta = NULL,
init.alpha=NULL,init.phi=1,tol=.00001,weights = NULL,
corstr = 'exchangeable',maxit=50,m=2,pMat=pMat)
summary_meanscore(m1)
#> $call
#> MeanScore(data = srdata1, formula = formula <- formula, id = "ID",
#> visit = "Visit", family = "gaussian", init.beta = NULL, init.alpha = NULL,
#> init.phi = 1, tol = 1e-05, weights = NULL, corstr = "exchangeable",
#> maxit = 50, m = 2, pMat = pMat)
#>
#> $inference
#> Estimates SE z value Pr(>|z|)
#> 1 672.80209372 2.333119e+02 2.8837023 0.00393030
#> 2 0.42917075 4.349044e-01 0.9868163 0.32373272
#> 3 0.35191319 6.701037e-01 0.5251623 0.59947035
#> 4 0.05025117 9.886384e-03 5.0828660 0.00000037
#> 5 -0.02466605 1.271584e-02 -1.9397898 0.05240524
#> 6 0.04980042 2.804215e-01 0.1775913 0.85904394
#> 7 -1.28003491 5.009943e-01 -2.5549889 0.01061912
#>
#> $phi
#> [1] 319700
#>
#> $Ralpha
#> [,1] [,2] [,3] [,4]
#> [1,] 1.0000000 -0.1103776 -0.1103776 -0.1103776
#> [2,] -0.1103776 1.0000000 -0.1103776 -0.1103776
#> [3,] -0.1103776 -0.1103776 1.0000000 -0.1103776
#> [4,] -0.1103776 -0.1103776 -0.1103776 1.0000000
#>
#> attr(,"class")
#> [1] "summary_meanscore"
The summary_meanscore() and summary_ipw() summarises the results from fitted object obtained from meanscore and ipw functions. It provides the list of parameter estimates, wald statistics, p-value, phi value.
The inverse probability weighted method can be used through the function . Similarly we need to specify a predictor matrix for the imputation of score fucntion missing due to incomplete data. The argument takes the predictor matrix to be used in inside the function. The demo code for this model as follows :
<-SIPW(data=srdata1,formula<-formula,id='ID',
m2visit='Visit',family='gaussian',corstr = 'exchangeable',maxit=5)
<-AIPW(data=srdata1,
m3<-formula,id='ID',
formulavisit='Visit',family='gaussian',init.beta = NULL,
init.alpha=NULL,init.phi=1,tol=.00001,weights = NULL,
corstr = 'exchangeable',maxit=50,m=3,pMat=pMat)
<-miSIPW(data=srdata1,
m4<-formula,id='ID',
formulavisit='Visit',family='gaussian',init.beta = NULL,
init.alpha=NULL,init.phi=1,tol=0.001,weights = NULL,
corstr = 'exchangeable',maxit=50,m=2,pMat=pMat)
<-miAIPW(data=srdata1,
m1<-formula,id='ID',
formulavisit='Visit',family='gaussian',init.beta = NULL,
init.alpha=NULL,init.phi=1,tol=.00001,weights = NULL,
corstr = 'exchangeable',maxit=4,m=2,pMat=pMat)
The function provides the list of various model selection criterion based on quasi liklihood. The demo code is as follows
<-MeanScore(data=srdata1,
m1<-formula,id='ID',
formulavisit='Visit',family='gaussian',init.beta = NULL,
init.alpha=NULL,init.phi=1,tol=.00001,weights = NULL,
corstr = 'exchangeable',maxit=50,m=2,pMat=pMat)
<-MeanScore(data=srdata1,
m11<-formula,id='ID',
formulavisit='Visit',family='gaussian',init.beta = NULL,
init.alpha=NULL,init.phi=1,tol=.00001,weights = NULL,
corstr = 'independent',maxit=50,m=2,pMat=pMat)
QICmiipw(model.R=m1,model.indep=m11,family="gaussian")
#> QIC QICu Quasi Lik
#> 171.7651 485.0000 -78.5000
##
These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.