Description Usage Arguments Value
Format data for TMB calculations.
1 | format_data(y, X, id)
|
y |
Response vector for all subjects. A vector of length |
X |
Covariate matrix from all subjects. A matrix of size |
id |
Subject identifiers. A vector of length |
A list with the following elements:
y
The response vector y
, reordered such that all observations for a given subject are consecutive, and converted to an n x 1
column matrix.
Xtr
The transpose of the covariate matrix, reordered the same way as y
, having size p x n
.
iStart
An integer vector of length nsub
, specifying the starting index of the observations for each subject, using C++ indexing (i.e., starting at zero).
nObs
An integer vector of length nsub
, specifying the number of observations per subject.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.