Generated predictions from a regression model
predictAndromeda(
coefficients,
population,
covariateData,
modelType = "logistic"
)
A names numeric vector where the names are the covariateIds, except for the first value which is expected to be the intercept.
A data frame containing the population to do the prediction for
An andromeda object containing the covariateData with predefined columns (see below).
Current supported types are "logistic", "poisson", "cox" or "survival".
These columns are expected in the outcome object:
rowId |
(integer) | Row ID is used to link multiple covariates (x) to a single outcome (y) |
time |
(real) | For models that use time (e.g. Poisson or Cox regression) this contains time |
(e.g. number of days) |
These columns are expected in the covariates 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 |