| data | R Documentation |
simulated data for demonstrating the features of mixedBayes
The data object consists of seven components: y, e, X, g, w ,k and coeff. coeff contains the true values of parameters (main and interaction effects) used for generating Y.
The data and model setting
Consider a longitudinal study on n subjects with k repeated measurement for each subject. Let \boldsymbol{Y_{ij}} be the measurement for the ith subject at each time point j(1\leq i \leq n, 1\leq j \leq k) .We use the m-dimensional vector \boldsymbol{G_{ij}} to denote measurements of genetic factors for the ith subject at time point j, where \boldsymbol{G_{ij}} = (G_{ij1},...,G_{ijm})^\top. Also, we use p-dimensional vector \boldsymbol{E_{ij}} to denote the environment/treatment factors, where \boldsymbol{E_{ij}} = (E_{ij1},...,E_{ijp})^\top. \boldsymbol{X_{ij}} = (1, \boldsymbol{T^\top_{ij}})^\top, where \boldsymbol{T_{ij}} is a vector of time effects . \boldsymbol{Z_{ij}} is a h \times 1 covariate associated with random effects and \boldsymbol{\alpha_{i,\theta}} is a h\times 1 vector of random effects. In a typical one-way repeated measure ANOVA with a fixed number (say four) of factor levels, the environment (or treatment) factor is modeled as a group of three dummy variables. Therefore, gene-environment (or treatment) interaction leads to variable selections on individual levels (main effects) and group levels (interaction effects) simultaneously. Considering the genetics factors, environment (or treatment) factors and their interactions that are jointly associated with the longitudinal phenotype, we have the following mixed-effects model at a given quantile level \theta, (0 < \theta < 1):
\boldsymbol{Y_{ij}} = \boldsymbol{X^\top_{ij}}\boldsymbol{\gamma_{0,\theta}}+\boldsymbol{E^\top_{ij}}\boldsymbol{\gamma_{1,\theta}}+\boldsymbol{G^\top_{ij}}\boldsymbol{\gamma_{2,\theta}}+(\boldsymbol{G_{ij}}\bigotimes \boldsymbol{E_{ij}})^\top\boldsymbol{\gamma_{3,\theta}}+\boldsymbol{Z^\top_{ij}}\boldsymbol{\alpha_{i,\theta}}+\epsilon_{ij,\theta}.
where \boldsymbol{\gamma_{1,\theta}},\boldsymbol{\gamma_{2,\theta}},\boldsymbol{\gamma_{3,\theta}} are p,m and mp dimensional vectors that represent the coefficients of the environment effects, the genetic effects and interaction effects, respectively. In addition, \boldsymbol{\gamma_{0,\theta}} is the coefficient vector for \boldsymbol{X_{ij}}.
The gene–environment interactions that can be expressed as a Kronecker product between the two types of main effects as a mp-dimensional vector:
\boldsymbol{G_{ij}}\bigotimes \boldsymbol{E_{ij}} = [G_{ij1}E_{ij1},G_{ij1}E_{ij2},...,G_{ij1}E_{ijp},G_{ij2}E_{ij1},...,G_{ijm}E_{ijp}]^\top.
The above model also includes \boldsymbol{Z_{ij}} with random effects \boldsymbol{\alpha_{i,\theta}} to account for intra-correlations among repeated measurements.
The h \times 1 vector \boldsymbol{Z_{ij}} corresponds to the random intercept–slope model and random intercept model under h = 2 and 1, respectively. The model error \epsilon_{ij,\theta}’s are independent with the \thetath quantile being zero.
Without loss of generality, we suppress the subscript \theta of the regression coefficient vectors for both fixed and random effects from now on for simplicity of notation.
In this example, we generate data under random intercept-and-slope model.
mixedBayes
data(data)
length(y)
dim(g)
dim(e)
dim(w)
print(k)
print(X)
print(coeff)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.