Learn R Programming

PatientLevelPrediction (version 3.0.0)

predictFfdf: Generated predictions from a regression model

Description

Generated predictions from a regression model

Usage

predictFfdf(coefficients, population, covariates, modelType = "logistic")

Arguments

coefficients

A names numeric vector where the names are the covariateIds, except for the first value which is expected to be the intercept.

population

A data frame containing the population to do the prediction for

covariates

A data frame or ffdf object containing the covariates with predefined columns (see below).

modelType

Current supported types are "logistic", "poisson", or "survival".

Details

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