convertToTimeVaryingCoef | R Documentation |
convertToTimeVaryingCoef
convert short sparse covariate table to long sparse covariate table for time-varying coefficients.
convertToTimeVaryingCoef(shortCov, longOut, timeVaryCoefId)
shortCov |
A data frame containing the covariate with predefined columns (see below). |
longOut |
A data frame containing the outcomes with predefined columns (see below), output of |
timeVaryCoefId |
Integer: A numeric identifier of a time-varying coefficient |
These columns are expected in the shortCov object:
rowId | (integer) | Row ID is used to link multiple covariates (x) to a single outcome (y) |
covariateId | (integer) | A numeric identifier of a covariate |
covariateValue | (real) | The value of the specified covariate |
These columns are expected in the longOut object:
stratumId | (integer) | Stratum ID for time-varying models |
subjectId | (integer) | Subject ID is used to link multiple covariates (x) at different time intervals to a single subject |
rowId | (integer) | Row ID is used to link multiple covariates (x) to a single outcome (y) |
y | (real) | The outcome variable |
time | (real) | For models that use time (e.g. Poisson or Cox regression) this contains time |
(e.g. number of days) | ||
A long sparse covariate table for time-varying coefficients.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.