| data | R Documentation |
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 of n subjects with
J_i repeated measurements for the i-th subject.
Let Y_{ij} denote the response for the i-th subject
at observation time t_{ij}, where 1 \leq i \leq n
and 1 \leq j \leq J_i.
Let X_{ij} = (X_{ij1}, \ldots, X_{ijm})^\top
denote an m-dimensional vector of predictors.
We consider the following varying coefficient 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},
where \alpha_0(t_{ij}) is the varying intercept,
\beta_k(t_{ij}) is the coefficient function for the
k-th predictor, and \zeta_i \sim N(0,\Lambda)
is the vector of random effects.
The coefficient functions are approximated using B-spline basis expansions. Under structured identification, an equivalent change of basis leads to
\beta_k(t_{ij}) \approx \gamma_{k1} +
\sum_{l=2}^{L} B_l(t_{ij}) \gamma_{kl},
where L=kn+degree+1 is the number of basis functions.
The scalar \gamma_{k1} and the coefficient vector
(\gamma_{k2}, \ldots, \gamma_{kL})^\top correspond
to the constant and time-varying components, respectively.
This formulation allows the identification of constant
and time-varying effects.
Without structured identification, constant and
time-varying effects are not separated.
For the random intercept and slope model,
Z_{ij}^\top = (1,j) and
\zeta_i = (\zeta_{i1}, \zeta_{i2})^\top.
Through Cholesky decomposition
\Lambda = \Delta \Delta^\top, the random effects
are reparameterized as \zeta_i = \Delta b_i,
where b_i \sim N(0,I_2). Consequently,
Z_{ij}^\top \zeta_i =
(b_i^\top \otimes Z_{ij}^\top) J_2 \delta,
where \delta contains the lower triangular elements
of \Delta, and J_2 is a transformation matrix
satisfying \mathrm{vec}(\Delta) = J_2 \delta.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.