predictALARM: ALARM Predictions

View source: R/predict.R

predictALARMR Documentation

ALARM Predictions

Description

Makes predictions for the absolute risk of lung cancer mortality for never and ever smokers, based on a set of covariates, at a chosen time horizon.

Usage

predictALARM(data, time = 5, ...)

Arguments

data

Data frame containing covariate values at which to produce absolute risk predictions. See validate_data() for information on the expected format of the data.

time

Time horizon at which to make predictions.

...

Not currently used.

Value

A data.frame with same number of rows as newdata, and in the same order. The data.frame will contain the original columns plus the added column ALARM_pred, which is the predicted absolute risk of lung cancer mortality at time time.

See Also

validate_data()

Examples


data <- data.frame(age = 70, sex = 1, fhx_cancer = 1,
                   phx_cancer = 0, fev1fvc = 70, phx_lungdx = 1,
                   hhinc = 3, bmi = 30, 
                   smk_status = c(1, 2), smk_duration = c(NA, 40), 
                   smk_cigpday = c(NA, 20))
predictALARM(data)


mattwarkentin/ALARM documentation built on July 16, 2025, 3:53 p.m.