Learn R Programming

PatientLevelPrediction (version 3.0.0)

fitGLMModel: Fit a predictive model

Description

Fit a predictive model

Usage

fitGLMModel(population, plpData, modelType = "logistic",
  excludeCovariateIds = c(), includeCovariateIds = c(),
  prior = createPrior("laplace", useCrossValidation = TRUE),
  control = createControl(cvType = "auto", fold = 3, startingVariance = 0.01,
  tolerance = 2e-06, cvRepetitions = 1, selectorType = "byPid", noiseLevel =
  "silent", threads = -1, maxIterations = 3000))

Arguments

population

A population object generated by createStudyPopulation, potentially filtered by other functions.

plpData

An object of type plpData as generated using getDbPlpData.

modelType

The type of outcome model that will be used. Possible values are "logistic", "poisson", or "cox".

excludeCovariateIds

Exclude these covariates from the outcome model.

includeCovariateIds

Include only these covariates in the outcome model.

prior

The prior used to fit the model. See createPrior for details.

control

The control object used to control the cross-validation used to determine the hyperparameters of the prior (if applicable). See createControl for details.