Learn R Programming

PatientLevelPrediction (version 3.0.0)

createExistingModelSql: Apply an existing logistic regression prediction model

Description

Apply an existing logistic regression prediction model

Usage

createExistingModelSql(modelTable, modelNames, interceptTable, covariateTable,
  type = "logistic", analysisId = 112, covariateSettings, asFunctions = F,
  customCovariates = NULL, e = environment())

Arguments

modelTable

A dataframe or list of dataframes with columns: modelId, modelCovariateId, coefficientValue all doubles

modelNames

A name used in the covariate function names (no spaces)

interceptTable

A dataframe or list of dataframes with the columns: modelId, interceptValue

covariateTable

A dataframe or list of dataframes with columns: modelCovariateId, covariateId (the mapping of covariate_id to standard covariates)

type

The type of model: logistic or linear/score

analysisId

The covariate analysis_id (default 112)

covariateSettings

The settings for the standard covariates (needs for temporal settings)

asFunctions

If T then return two functions

customCovariates

enables custome SQL to be used to create custom covariates

e

The environment to output the covariate setting functions to

Details

This function is used to create custom covariates corresponding to existing models