Simulated gene expression data for demonstrating the features of Blend.
The data object consists of 8 components: y, x, t, J, kn and degree.
The data and model setting
Consider a longitudinal study on \(n\) subjects with \(J_i\) repeated measurements for each subject. Let \(Y_{ij}\) be the measurement for the \(i\)-th subject at each time point \(t_{ij}\), \((1 \leq i \leq n, 1 \leq j \leq J_i)\). We use an \(m\)-dimensional vector \(X_{ij}\) to denote the genetic factors, where \(X_{ij} = (X_{ij1},...,X_{ijm})^\top\). \(Z_{ij}\) is a \(2 \times 1\) covariate associated with random effects and \(\zeta_{i}\) is a \(2 \times 1\) vector of random effects corresponding to the random intercept and slope model. We have the following semi-parametric quantile mixed-effects model:
\(Y_{ij} = \alpha_0(t_{ij}) + \sum_{k=1}^{m} \beta_{k}(t_{ij}) X_{ijk} + Z_{ij}^\top \zeta_{i} + \epsilon_{ij}, \zeta_{i} \sim N(0, \Lambda)\)
where the fixed effects include: (a) the varying intercept \(\alpha_0(t_{ij})\), and (b) the varying coefficients \(\beta(t_{ij})\).
The varying intercept and the varying coefficients for the genetic factors can be further expressed as \(\alpha_0(t_{ij})\) and \(\beta(t_{ij}) = (\beta_{1}(t_{ij}), ..., \beta_{m}(t_{ij}))^\top\).
For the random intercept and slope model, \(Z_{ij}^\top = (1, j)\) and \(\zeta_{i} = (\zeta_{i1}, \zeta_{i2})^\top\).
Furthermore, \(Z_{ij}^\top \zeta_{i}\) can be expressed as \((b_i^\top \otimes Z^\top_{ij}) J_2 \delta\), where \(\zeta_{i} = \Delta b_i\), \(\Lambda = \Delta \Delta^\top\), and
\(b_i^\top \otimes Z^\top_{ij} = (b_{i1} Z_{ij1}, b_{i1} Z_{ij2}, b_{i2}Z_{ij1}, b_{i2} Z_{ij2})^\top\).
In the simulated data,
$$Y = \alpha_{0}(t)+\beta_{1}(t)X_{1} + \beta_{2}(t)X_{2} + \beta_{3}(t)X_{3}+ \beta_{4}(t)X_{4}+0.8X_{5} -1.2 X_{6} + 0.7X_{7}-1.1 X_{8}+\epsilon$$
where \(\epsilon\sim N(0,1)\), \(\alpha_{0}(t)=2+\sin(2\pi t)\), \(\beta_{1}(t)=2.5\exp(2.5t-1) \),\(\beta_{2}(t)=3t^2-2t+2\),\(\beta_{3}(t)=-4t^3+3\) and \(\beta_{4}(t)=3-2t\)
Blend
data(dat)
length(y)
dim(x)
length(t)
length(J)
print(t)
print(J)
print(kn)
print(degree)
Run the code above in your browser using DataLab