pnmtrem1.sim.data1
. The second covariate, X2 is a response type indicator variable which takes 1 for the first response, and takes 0 for the second one. The assumed parameters to generate the data are: $\beta=(\beta_0, \beta_1, \beta_2) = (-1, 2, 0.2)$, $\alpha_{t,1}=(\alpha_{21,1}, \alpha_{31,1}, \alpha_{41,1})= (0.5, 0.7, 0.9)$, $\lambda_j=(\lambda_1, \lambda_2)=(1, 1.05)$ and $b_{it} \sim N(0,\sigma_t^2)$, $\sigma_t=(\sigma_2, \sigma_3, \sigma_4)=(0.66, 0.63, 0.60)$. It is assumed that there 500 subjects. The dataset has no missing value.
data(pnmtrem1.sim.data2)
time
response
subject
y
ones
x1
x2
time
, response
and subject
orders, s/he can easily understand the data structure which the model accepts. Baseline and later time points of the data may include different number of independent variables. Therefore, datasets for $t=1$ and $t \geq 2$ are presented in different data objects, pnmtrem1.sim.data1
and pnmtrem1.sim.data2
, respectively.
data(pnmtrem1.sim.data2)
head(pnmtrem1.sim.data2)
str(pnmtrem1.sim.data2)
Run the code above in your browser using DataLab