Title: | A Bayesian Multi-Dimensional Couple-Based Latent Risk Model |
---|---|
Description: | A joint latent class model where a hierarchical structure exists, with an interaction between female and male partners of a couple. A Bayesian perspective to inference and Markov chain Monte Carlo algorithms to obtain posterior estimates of model parameters. The reference paper is: Beom Seuk Hwang, Zhen Chen, Germaine M.Buck Louis, Paul S. Albert, (2018) "A Bayesian multi-dimensional couple-based latent risk model with an application to infertility". Biometrics, 75, 315-325. <doi:10.1111/biom.12972>. |
Authors: | Beom Seuk Hwang [aut], Zhen Chen [aut], Germaine M. Buck Louis [aut], Paul S. Albert [aut], Weimin Zhang [cre] |
Maintainer: | Weimin Zhang <[email protected]> |
License: | GPL-3 |
Version: | 0.1.0 |
Built: | 2025-02-13 04:27:41 UTC |
Source: | https://github.com/wzhang17/lchemix |
This function fit a couple-based joint latent class model with an interaction between a couple(e.g., female and male partners) and High-dimensional semicontinuous chemical biomarker for each partner of the couple. This formulation introduces a dependence structure between the chemical patterns within a couple and between the chemical patterns and the risk of desease. A Bayesian framework examines the chemical biomarker profile from each member of the couple and the risk of disease. The complex chemical mixtures on each couple link to disease risk through unobserved latent classes. we posit that two sets of latent classes, each characterizing the chemical mixture patterns of one partner of the couple, are linked to the risk of disease through a logistic model with main and interaction effects between latent classes. The semicontinuous chimical biomarker viarables (1/4 zeros and right-skewed non-zero values) are processed through Tobit modeling framework. Markov chain Monte Carlo algorithms was used to obtain posterior estimates of model parameters.The user supplies data and priors, and a list of posterior estimates of model parameters is returned.
JLchemix( nsim = 700, nburn = 500, Yvariable, X.f_mat, X.m_mat, covariate_f_mat, covariate_m_mat, seed_num = 678443068, K = 3, alpha.0f = -6, alpha.1f = 1, alpha.0m = -6, alpha.1m = 1, beta.0 = -4.5, beta.1f = 0.5, beta.1m = 0.5, beta.2 = 1, b.0f = c(-7.254321, -7.010908, -3.880426, -8.118554, -6.759431, -7.230387, -4.878213, -5.007503, -6.856297, -4.489543, -8.068346, -5.106003, -6.45287, -4.495532, -5.517385, -6.268557, -6.053185, -5.464252, -6.452734, -5.906192, -6.260919, -5.69159, -5.61441, -6.143081, -5.047088, -5.301305, -5.913374, -5.756906, -6.054626, -6.87334, -6.849659, -7.004676, -5.332403, -7.307853, -5.183989, -6.383119), b.0m = c(-5.079509, -7.272471, -6.521358, -6.128509, -5.696533, -6.374789, -5.777319, -4.826086, -8.98966, -6.708051, -4.058636, -5.976921, -5.306304, -4.786394, -6.425503, -4.867691, -6.091003, -7.162082, -5.652558, -6.368305, -4.130053, -6.062718, -6.272025, -6.096108, -7.405642, -4.415025, -7.6361, -5.613704, -6.741973, -5.124894, -7.442003, -6.065161, -6.127977, -6.39778, -5.039697, -5.91236), b.1f = c(0.06081535, 0.27933553, 1.09567058, 1.3052503, -1.7136343, 3.56305321, 1.44386159, 1.11045081, 0.91064552, 2.33861095, 1.8940006, 1.73022487, 0.12834589, 0.9897258, 0.70672882, 1.82998947, 0.67922938, 0.91639977, 1.92834454, 1.01663356, 0.13329777, 1.94157555, 0.85399484, 1.57496884, 1.4586229, 1.78167318, -0.07774665, 2.66127628, -0.58454029, 0.77320667, 0.97268288, 0.85628677, 0.75621566, 1.06990346, 1.14924001, 0.95091695), b.1m = c(1.68599796, 0.53185998, 1.14397009, 2.8661986, 4.08110658, 0.37164953, 1.54640353, 1.27457107, 3.80397148, 0.82511839, 2.99448637, 2.4121241, 1.47281944, 0.82053754, 2.01676277, -0.99610755, -0.03900866, 1.47895046, 1.15950092, 0.91964213, 1.1740925, 1.3381932, 1.36568913, 0.55896975, 1.41116326, 3.3092799, 1.51011954, 0.90399847, 0.40348049, 1.27435217, 1.53464794, 2.73497557, 1.91075938, 0.93572173, 2.02485773, 3.82461971), eta.0f = 2, eta.1f = 0.5, eta.0m = 2, eta.1m = 0.5, Sigma.b = diag(4), tau2.f = 0.5, tau2.m = 0.5, lambda.1f = 0.5, lambda.2f = 0, lambda.3f = 0, lambda.4f = 0, lambda.5f = 0, lambda.1m = 0.5, lambda.2m = 0, lambda.3m = 0, lambda.4m = 0, lambda.5m = 0, mu.b0 = 0, mu.b1f = 0, mu.b1m = 0, mu.b2 = 0, sig2.b0 = 100, sig2.b1f = 1, sig2.b1m = 1, sig2.b2 = 100, mu.a0f = 0, mu.a1f = 0, mu.a0m = 0, mu.a1m = 0, sig2.a0f = 100, sig2.a1f = 100, sig2.a0m = 100, sig2.a1m = 100, mu.e0f = 0, mu.e1f = 0, mu.e0m = 0, mu.e1m = 0, sig2.e0f = 100, sig2.e1f = 100, sig2.e0m = 100, sig2.e1m = 100, a.tau = 1, b.tau = 1, mu.lf = rep(0, covariate_num), mu.lm = rep(0, covariate_num), Sigma.lf = 10 * diag(covariate_num), Sigma.lm = 10 * diag(covariate_num), s.b0 = 2.4^2, s.b1f = 2.4^2, s.b1m = 2.4^2, s.b2 = 2.4^2, var.b0 = 1, var.b1f = 1, var.b1m = 1, var.b2 = 1, s.e0f = 2.4^2, s.e1f = 2.4^2, s.e0m = 2.4^2, s.e1m = 2.4^2, var.e0f = 1, var.e1f = 1, var.e0m = 1, var.e1m = 1, s.r = 2.4^2, cov.r = diag(4), s.lf = 2.4^2, s.lm = 2.4^2, eps = 0.01, nu = 4, Sigma.0 = diag(4) )
JLchemix( nsim = 700, nburn = 500, Yvariable, X.f_mat, X.m_mat, covariate_f_mat, covariate_m_mat, seed_num = 678443068, K = 3, alpha.0f = -6, alpha.1f = 1, alpha.0m = -6, alpha.1m = 1, beta.0 = -4.5, beta.1f = 0.5, beta.1m = 0.5, beta.2 = 1, b.0f = c(-7.254321, -7.010908, -3.880426, -8.118554, -6.759431, -7.230387, -4.878213, -5.007503, -6.856297, -4.489543, -8.068346, -5.106003, -6.45287, -4.495532, -5.517385, -6.268557, -6.053185, -5.464252, -6.452734, -5.906192, -6.260919, -5.69159, -5.61441, -6.143081, -5.047088, -5.301305, -5.913374, -5.756906, -6.054626, -6.87334, -6.849659, -7.004676, -5.332403, -7.307853, -5.183989, -6.383119), b.0m = c(-5.079509, -7.272471, -6.521358, -6.128509, -5.696533, -6.374789, -5.777319, -4.826086, -8.98966, -6.708051, -4.058636, -5.976921, -5.306304, -4.786394, -6.425503, -4.867691, -6.091003, -7.162082, -5.652558, -6.368305, -4.130053, -6.062718, -6.272025, -6.096108, -7.405642, -4.415025, -7.6361, -5.613704, -6.741973, -5.124894, -7.442003, -6.065161, -6.127977, -6.39778, -5.039697, -5.91236), b.1f = c(0.06081535, 0.27933553, 1.09567058, 1.3052503, -1.7136343, 3.56305321, 1.44386159, 1.11045081, 0.91064552, 2.33861095, 1.8940006, 1.73022487, 0.12834589, 0.9897258, 0.70672882, 1.82998947, 0.67922938, 0.91639977, 1.92834454, 1.01663356, 0.13329777, 1.94157555, 0.85399484, 1.57496884, 1.4586229, 1.78167318, -0.07774665, 2.66127628, -0.58454029, 0.77320667, 0.97268288, 0.85628677, 0.75621566, 1.06990346, 1.14924001, 0.95091695), b.1m = c(1.68599796, 0.53185998, 1.14397009, 2.8661986, 4.08110658, 0.37164953, 1.54640353, 1.27457107, 3.80397148, 0.82511839, 2.99448637, 2.4121241, 1.47281944, 0.82053754, 2.01676277, -0.99610755, -0.03900866, 1.47895046, 1.15950092, 0.91964213, 1.1740925, 1.3381932, 1.36568913, 0.55896975, 1.41116326, 3.3092799, 1.51011954, 0.90399847, 0.40348049, 1.27435217, 1.53464794, 2.73497557, 1.91075938, 0.93572173, 2.02485773, 3.82461971), eta.0f = 2, eta.1f = 0.5, eta.0m = 2, eta.1m = 0.5, Sigma.b = diag(4), tau2.f = 0.5, tau2.m = 0.5, lambda.1f = 0.5, lambda.2f = 0, lambda.3f = 0, lambda.4f = 0, lambda.5f = 0, lambda.1m = 0.5, lambda.2m = 0, lambda.3m = 0, lambda.4m = 0, lambda.5m = 0, mu.b0 = 0, mu.b1f = 0, mu.b1m = 0, mu.b2 = 0, sig2.b0 = 100, sig2.b1f = 1, sig2.b1m = 1, sig2.b2 = 100, mu.a0f = 0, mu.a1f = 0, mu.a0m = 0, mu.a1m = 0, sig2.a0f = 100, sig2.a1f = 100, sig2.a0m = 100, sig2.a1m = 100, mu.e0f = 0, mu.e1f = 0, mu.e0m = 0, mu.e1m = 0, sig2.e0f = 100, sig2.e1f = 100, sig2.e0m = 100, sig2.e1m = 100, a.tau = 1, b.tau = 1, mu.lf = rep(0, covariate_num), mu.lm = rep(0, covariate_num), Sigma.lf = 10 * diag(covariate_num), Sigma.lm = 10 * diag(covariate_num), s.b0 = 2.4^2, s.b1f = 2.4^2, s.b1m = 2.4^2, s.b2 = 2.4^2, var.b0 = 1, var.b1f = 1, var.b1m = 1, var.b2 = 1, s.e0f = 2.4^2, s.e1f = 2.4^2, s.e0m = 2.4^2, s.e1m = 2.4^2, var.e0f = 1, var.e1f = 1, var.e0m = 1, var.e1m = 1, s.r = 2.4^2, cov.r = diag(4), s.lf = 2.4^2, s.lm = 2.4^2, eps = 0.01, nu = 4, Sigma.0 = diag(4) )
nsim |
Number of simulations |
nburn |
Burn in number |
Yvariable |
Binary indicating dependent variable for the couple disease status, 1 for disease |
X.f_mat |
chemical exposure variables for female individual |
X.m_mat |
chemical exposure variables for male individual |
covariate_f_mat |
subject-specific covariates such as age or smoking status for female individual |
covariate_m_mat |
subject-specific covariates such as age or smoking status for male individual |
seed_num |
The seed for the random number generator. If NA, the default seed 678443068 is used |
K |
latent class number. Default is 3 |
alpha.0f |
Initial value for fixed effect coefficient of the latent class variable for female individual |
alpha.1f |
Initial value for fixed effect coefficient of the latent class variable for female individual |
alpha.0m |
Initial value for fixed effect coefficient of the latent class variable for male individual |
alpha.1m |
Initial value for fixed effect coefficient of the latent class variable for male individual |
beta.0 |
Initial value for Regression coefficients representing the association between the risk of Binary indicating variable for the couple and the latent class variables |
beta.1f |
Initial value for Regression coefficients representing the association between the risk of Binary indicating variable for the couple and the latent class variables |
beta.1m |
Initial value for Regression coefficients representing the association between the risk of Binary indicating variable for the couple and the latent class variables |
beta.2 |
Initial value for Regression coefficients representing the association between the risk of Binary indicating variable for the couple and the latent class variables |
b.0f |
Initial value for random effect coefficient of the latent class variable for female individual |
b.0m |
Initial value for random effect coefficient of the latent class variable for male individual |
b.1f |
Initial value for random effect coefficient of the latent class variable for female individual |
b.1m |
Initial value for random effect coefficient of the latent class variable for male individual |
eta.0f |
Initial value for coefficient for the association between the risk of Binary nonzero measurement indicator for female individual and Nonzero measurement on the log scale for female individual |
eta.1f |
Initial value for coefficient for the association between the risk of Binary nonzero measurement indicator for female individual and Nonzero measurement on the log scale for female individual |
eta.0m |
Initial value for coefficient for the association between the risk of Binary nonzero measurement indicator for male individual and Nonzero measurement on the log scale for male individual |
eta.1m |
coefficient for the association between the risk of Binary nonzero measurement indicator for male individual and Nonzero measurement on the log scale for male individual |
Sigma.b |
Initial value for Variance covariance matrix for Nonzero measurement specific shared random effects vector |
tau2.f |
Initial value for variace of V.f_mat Nonzero measurement on the log scale for female individual |
tau2.m |
variace of V.m_mat Nonzero measurement on the log scale for male individual |
lambda.1f |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for female individual |
lambda.2f |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for female individual |
lambda.3f |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for female individual |
lambda.4f |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for female individual |
lambda.5f |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for female individual |
lambda.1m |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for male individual |
lambda.2m |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for male individual |
lambda.3m |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for male individual |
lambda.4m |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for male individual |
lambda.5m |
Initial value for Parameter vector for subject-specific covariates such as age, BMI or smoking status for male individual |
mu.b0 |
Initial value for prior distribution of beta0 |
mu.b1f |
Initial value for prior distribution of beta0 for female individual |
mu.b1m |
Initial value for prior distribution of beta0 for male individual |
mu.b2 |
Initial value for prior distribution of beta0 |
sig2.b0 |
Initial value for prior distribution of beta0 |
sig2.b1f |
Initial value for prior distribution of beta0 |
sig2.b1m |
Initial value for prior distribution of beta0 |
sig2.b2 |
Initial value for prior distribution of beta0 |
mu.a0f |
Initial value for noninformative normal prior distribution of alpha for female individual |
mu.a1f |
Initial value for noninformative normal prior distribution of alpha female individual |
mu.a0m |
Initial value for noninformative normal prior distribution for male individual alpha |
mu.a1m |
Initial value for noninformative normal prior distribution for male individual alpha |
sig2.a0f |
Initial value for noninformative normal prior distribution for female individual alpha |
sig2.a1f |
Initial value for noninformative normal prior distribution for female individual alpha |
sig2.a0m |
Initial value for noninformative normal prior distribution for male individual alpha |
sig2.a1m |
Initial value for noninformative normal prior distribution for male individual alpha |
mu.e0f |
Initial value for noninformative normal prior distribution for female individual eta0 |
mu.e1f |
Initial value for noninformative normal prior distribution for female individual eta1 |
mu.e0m |
Initial value for noninformative normal prior distribution for male individual eta0 |
mu.e1m |
Initial value for noninformative normal prior distribution for male individual eta1 |
sig2.e0f |
Initial value for noninformative normal prior distribution for female individual eta0 |
sig2.e1f |
Initial value for noninformative normal prior distribution for female individual eta1 |
sig2.e0m |
Initial value for noninformative normal prior distribution for male individual eta0 |
sig2.e1m |
Initial value for noninformative normal prior distribution for male individual eta0 |
a.tau |
Initial value for prior distribution for inverse-Gamma distribution tau square |
b.tau |
Initial value for prior distribution for inverse-Gamma distribution tau square |
mu.lf |
Initial value for prior distribution for female individual lambda |
mu.lm |
Initial value for prior distribution for male individual lambda |
Sigma.lf |
Initial value for prior distribution for female individual lambda |
Sigma.lm |
Initial value for prior distribution for male individual lambda |
s.b0 |
Initial value for conditional posterior distribution of beta0 for adaptive Metropolis algorithm |
s.b1f |
Initial value for conditional posterior distribution of female beta1 for adaptive Metropolis algorithm |
s.b1m |
Initial value for conditional posterior distribution of male beta1 for adaptive Metropolis algorithm |
s.b2 |
Initial value for conditional posterior distribution of beta2 for adaptive Metropolis algorithm |
var.b0 |
Initial value for conditional posterior distribution of beta0 for adaptive Metropolis algorithm |
var.b1f |
Initial value for conditional posterior distribution of female beta1 for adaptive Metropolis algorithm |
var.b1m |
Initial value for conditional posterior distribution of male beta1 for adaptive Metropolis algorithm |
var.b2 |
Initial value for conditional posterior distribution of beta2 for adaptive Metropolis algorithm |
s.e0f |
Initial value for conditional posterior distribution of female eta0 for adaptive Metropolis algorithm |
s.e1f |
Initial value for conditional posterior distribution of female eta1 for adaptive Metropolis algorithm |
s.e0m |
Initial value for conditional posterior distribution of male eta0 for adaptive Metropolis algorithm |
s.e1m |
Initial value for conditional posterior distribution of male eta1 for adaptive Metropolis algorithm |
var.e0f |
Initial value for conditional posterior distribution of female eta0 for adaptive Metropolis algorithm |
var.e1f |
Initial value for conditional posterior distribution of female eta1 for adaptive Metropolis algorithm |
var.e0m |
Initial value for conditional posterior distribution of male eta0 for adaptive Metropolis algorithm |
var.e1m |
Initial value for conditional posterior distribution of male eta1 for adaptive Metropolis algorithm |
s.r |
Initial value for conditional posterior distribution of random effect b for adaptive Metropolis algorithm |
cov.r |
Initial value for conditional posterior distribution of random effect b for adaptive Metropolis algorithm |
s.lf |
Initial value for conditional posterior distribution of female lambda for adaptive Metropolis algorithm |
s.lm |
Initial value for conditional posterior distribution of male lambda for adaptive Metropolis algorithm |
eps |
Initial value for beta.0 |
nu |
Initial value for Sigma.b |
Sigma.0 |
Initial value for Sigma.b |
A list of posterior estimates, latent class probability estimates and DIC
Beom Seuk Hwang, Zhen Chen, Germaine M. Buck Louis, and Paul S. Albert. (2018) A Bayesian multi-dimensional couple-based latent risk model with an application to infertility. Biometrics, 75, 315–325. https://doi.org/10.1111/biom.12972
library(MCMCpack) library(mvtnorm) data(sampledata) try1 <-lchemix:::JLchemix(nsim=12,nburn=2,Yvariable= sampledata[,1], X.f_mat = sampledata[,2:37], X.m_mat = sampledata[,38:73], covariate_f_mat = sampledata[,74:78], covariate_m_mat = sampledata[,79:83])
library(MCMCpack) library(mvtnorm) data(sampledata) try1 <-lchemix:::JLchemix(nsim=12,nburn=2,Yvariable= sampledata[,1], X.f_mat = sampledata[,2:37], X.m_mat = sampledata[,38:73], covariate_f_mat = sampledata[,74:78], covariate_m_mat = sampledata[,79:83])
The example data is meant to represent one dataset for Scenario II in simulation study, which is explored in Section S3 of Supplementary Materials in the paper. The 'sampledata' file contains 378 rows and 83 variables.
sampledata
sampledata
A data frame with 378 rows and 83 variables:
Yvariable Binary indicating dependent variable for the couple disease status, 1 for disease
X.f_mat chemical exposure variables for female individual
X.m_mat chemical exposure variables for male individual
covariate_f_mat subject-specific covariates such as age or smoking status for female individual
covariate_m_mat subject-specific covariates such as age or smoking status for male individual
https://doi.org/10.1111/biom.12972