Title: | High Dimensional Longitudinal Data Analysis Using MCMC |
---|---|
Description: | High dimensional longitudinal data analysis with Markov Chain Monte Carlo(MCMC). Currently support mixed effect regression with or without missing observations by considering covariance structures. It provides estimates by missing at random and missing not at random assumptions. In this R package, we present Bayesian approaches that statisticians and clinical researchers can easily use. The functions' methodology is based on the book "Bayesian Approaches in Oncology Using R and OpenBUGS" by Bhattacharjee A (2020) <doi:10.1201/9780429329449-14>. |
Authors: | Atanu Bhattacharjee [aut, cre, ctb], Akash Pawar [aut, ctb], Bhrigu Kumar Rajbongshi [aut, ctb] |
Maintainer: | Atanu Bhattacharjee <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2024-11-02 03:26:34 UTC |
Source: | https://github.com/cran/longit |
Bayesian mixed effect model with random intercepts and random slopes. Fits using MCMC on longitudinal data set.
Bysmixed(m, n, t, group, chains, n.adapt, data)
Bysmixed(m, n, t, group, chains, n.adapt, data)
m |
Starting number of column from where repeated observations begin |
n |
Ending number of columns till where the repeated observations ends |
t |
Timepoint information on which repeadted observations were taken |
group |
A categorical variable either 0 or 1. i.e. Gender - 1 male and 0 female |
chains |
Number of MCMC chains to be performed |
n.adapt |
Number of iterations to run in the JAGS adaptive phase. |
data |
High dimensional longitudinal data |
Gives posterior means, standard deviation.
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(repdata) Bysmixed(m=4,n=7,t="Age",group="Gender",chains=4,n.adapt=100,repdata) ##
## data(repdata) Bysmixed(m=4,n=7,t="Age",group="Gender",chains=4,n.adapt=100,repdata) ##
Bayesian mixed effect model with random intercept and slopes provides inference with deviance information criterion (DIC). Data longitudinally measured missing value and having batched information. Fits using MCMC on longitudinal data set
BysmxDIC(m, tmax, t, group, chains, iter, out, data)
BysmxDIC(m, tmax, t, group, chains, iter, out, data)
m |
Starting number of column from where repeated observations begin |
tmax |
Ending number of columns till where the repeated observations ends |
t |
Timepoint information on which repeadted observations were taken |
group |
A categorical variable either 0 or 1. i.e. Gender - 1 male and 0 female |
chains |
Number of MCMC chains to be performed |
iter |
Number of iterations to be performed |
out |
DIC/HPD outcome |
data |
High dimensional longitudinal data |
Gives posterior means, standard deviation.
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(msrep) BysmxDIC(m=c(4,8,12),tmax=4,t="Age",group="Gender",chains=4,iter=1000,out="DIC",data=msrep) ##
## data(msrep) BysmxDIC(m=c(4,8,12),tmax=4,t="Age",group="Gender",chains=4,iter=1000,out="DIC",data=msrep) ##
Bayesian mixed effect model with random intercept and slopes provides inference with highest posterior density interval (HPDI). Data longitudinally measured missing value and having batched information. Fits using MCMC on longitudinal data set
BysmxHPD(m, tmax, t, group, chains, iter, out, data)
BysmxHPD(m, tmax, t, group, chains, iter, out, data)
m |
Starting number of column from where repeated observations begin |
tmax |
Ending number of columns till where the repeated observations ends |
t |
Timepoint information on which repeadted observations were taken |
group |
A categorical variable either 0 or 1. i.e. Gender - 1 male and 0 female |
chains |
Number of MCMC chains to be performed |
iter |
Number of iterations to be performed |
out |
DIC/HPD outcome |
data |
High dimensional longitudinal data |
Gives posterior means, standard deviation.
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(msrep) BysmxHPD(m=c(4,8,12),tmax=4,t="Age",group="Gender",chains=4,iter=1000,out="hpD",data=msrep) ##
## data(msrep) BysmxHPD(m=c(4,8,12),tmax=4,t="Age",group="Gender",chains=4,iter=1000,out="hpD",data=msrep) ##
Bayesian mixed effect model with random intercepts and slopes with longitudinally measured missing data. Fits using MCMC on longitudinal data set
Bysmxms(m, n, time, group, chains, n.adapt, data)
Bysmxms(m, n, time, group, chains, n.adapt, data)
m |
Starting number of column from where repeated observations begin |
n |
Ending number of columns till where the repeated observations ends |
time |
Timepoint information on which repeadted observations were taken |
group |
A categorical variable either 0 or 1. i.e. Gender - 1 male and 0 female |
chains |
Number of MCMC chains to be performed |
n.adapt |
Number of iterations to run in the JAGS adaptive phase. |
data |
High dimensional longitudinal data |
Gives posterior means, standard deviation.
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(mesrep) Bysmxms(m=4,n=7,time="Age",group="Gender",chains=4,n.adapt=100,data=msrep) ##
## data(mesrep) Bysmxms(m=4,n=7,time="Age",group="Gender",chains=4,n.adapt=100,data=msrep) ##
Bayesian mixed effect model with random intercept and slopes. Data longitudinally measured missing value and having batched information. Fits using MCMC on longitudinal data set
Bysmxmss(m, tmax, timepoints, group, chains, iter, data)
Bysmxmss(m, tmax, timepoints, group, chains, iter, data)
m |
Starting number of column from where repeated observations begin |
tmax |
Maximum batch of visits considered as repeated measurements |
timepoints |
Timepoint information on which repeadted observations were taken |
group |
A categorical variable either 0 or 1. i.e. Gender - 1 male and 0 female |
chains |
Number of MCMC chains to be performed |
iter |
Number of iterations to be performed |
data |
High dimensional longitudinal data |
Gives posterior means, standard deviation.
Atanu Bhattacharjee and Akash Pawar
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(repdat)
## data(repdat)
Multivariate Regression with unstructured covariance matrix in longitudinal datasetup with high dimensional.
creg(m, n, chains, n.adapt, data)
creg(m, n, chains, n.adapt, data)
m |
Starting number of column from where repeated observations begin |
n |
Ending number of columns till where the repeated observations ends |
chains |
Number of MCMC chains to be performed |
n.adapt |
Number of iterations to be performed |
data |
High dimensional longitudinal data |
Results of posterior means and standard deviation.
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(repdata) creg(m=4,n=7,chains=4,n.adapt=100,data=repdata) ##
## data(repdata) creg(m=4,n=7,chains=4,n.adapt=100,data=repdata) ##
High dimensional data on three consecutive measurements for and treatment arm information column.
data(gh)
data(gh)
A tibble
with 4 columns which are :
Observation on first timepoint
Observation on second timepoint
Observation on first timepoint
Treatment arm of the patient
Missing at ranom by MCMC
hdmarjg(m, n, treatment, n.chains, n.iter, dat)
hdmarjg(m, n, treatment, n.chains, n.iter, dat)
m |
Starting column number of the Y observations |
n |
Ending column number of the Y observations |
treatment |
Variable/column name containing the Treatment observations |
n.chains |
Number of MCMC chains |
n.iter |
Number of MCMC iterations |
dat |
Data set containing treatment column and repeated observations arrange by columns observations |
A data table listing the posterior mean and sigma results
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(gh) hdmarjg(m=1,n=3,treatment="Treatment",n.chains=2,n.iter=10,dat=gh) ##
## data(gh) hdmarjg(m=1,n=3,treatment="Treatment",n.chains=2,n.iter=10,dat=gh) ##
Missing not at random by MCMC
hdmnarjg(m, n, treatment, n.chains, n.iter, dat)
hdmnarjg(m, n, treatment, n.chains, n.iter, dat)
m |
Starting column number of repeated observations |
n |
Ending column number of the repeated observations |
treatment |
Variable/column name containing the Treatment observations |
n.chains |
Number of MCMC chains |
n.iter |
Number of MCMC iterations |
dat |
Data set containing treatment column and repeated observations |
Results containing a data table listing the means and sigma results
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(gh) hdmnarjg(m=1,n=3,treatment="Treatment",n.chains=2,n.iter=10,dat=gh) ##
## data(gh) hdmnarjg(m=1,n=3,treatment="Treatment",n.chains=2,n.iter=10,dat=gh) ##
Longitudinal observation on single variable from different observations. Observations arranged in a column as the patient with corresponding column of ID.
data(longitdata)
data(longitdata)
A tibble
with 2 columns which are :
Patient ID
Repeated observations on the patient arranged in a row as per a subject
Longitudinal observation on single variable at different timepoints. Observations arranged in a column as the patient with corresponding column of ID.
data(msrep)
data(msrep)
A tibble
with 7 columns which are :
Patient ID
Categorical numeric variable, 1 if Males and 0 if female
Time or age at which observations were taken from every subjects
Columns stating number of observations at age 18,10,12 and 14
Multivariate Regression with independent covariance matrix in longitudinal datasetup with high dimensional.
mvncovar1(m, n, time, group, chains, iter, data)
mvncovar1(m, n, time, group, chains, iter, data)
m |
Starting number of column from where repeated observations begin |
n |
Ending number of columns till where the repeated observations ends |
time |
Timepoint information on which repeadted observations were taken |
group |
A categorical variable either 0 or 1. i.e. Gender - 1 male and 0 female |
chains |
Number of MCMC chains to be performed |
iter |
Number of iterations to be performed |
data |
High dimensional longitudinal data |
mvncovarout lists posterior omega and sigma values.
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(repdata) mvncovar1(m=4,n=7,time="Age",group="Gender",chains=10,iter=100,repdata) ##
## data(repdata) mvncovar1(m=4,n=7,time="Age",group="Gender",chains=10,iter=100,repdata) ##
Multivariate normal regression with group covaraites and unstructured covariance matrix.
mvncovar2(m, n, time, group, chains, iter, data)
mvncovar2(m, n, time, group, chains, iter, data)
m |
Starting number of column from where repeated observations begin |
n |
Ending number of columns till where the repeated observations ends |
time |
Timepoint information on which repeadted observations were taken |
group |
A categorical variable either 0 or 1. i.e. Gender - 1 male and 0 female |
chains |
Number of MCMC chains to be performed |
iter |
Number of iterations to be performed |
data |
High dimensional longitudinal data |
mvncovarout
Atanu Bhattacharjee, Akash Pawar and Bhrigu Kumar Rajbongshi
Bhattacharjee, A. (2020). Bayesian Approaches in Oncology Using R and OpenBUGS. CRC Press.
Gelman, A., Carlin, J. B., Stern, H. S., Dunson, D. B., Vehtari, A., & Rubin, D. B. (2013). Bayesian data analysis. CRC press.
Fitzmaurice, G. M., Laird, N. M., & Ware, J. H. (2012). Applied longitudinal analysis (Vol. 998). John Wiley & Sons.
## data(repdata) mvncovar2(m=4,n=7,time="Age",group="Gender",chains=4,iter=100,data=repdata) ##
## data(repdata) mvncovar2(m=4,n=7,time="Age",group="Gender",chains=4,iter=100,data=repdata) ##
Longitudinal observation on single variable at different timepoints. Observations arranged in a column as the patient with corresponding column of ID.
data(repdata)
data(repdata)
A tibble
with 7 columns which are :
Patient ID
Categorical numeric variable, 1 if Males and 0 if female
Time or age at which observations were taken from every subjects
Columns stating number of observations at age 18,10,12 and 14