Skip to contents

This function computes a result using a pre-defined metamodel, and user-defined inputs to make the prediction.

Usage

predict_metamodel(metamodel, inputs)

Arguments

inputs

a numeric value or vector of numeric values. These inputs value will be used for the prediction using the metamodel.

lm_metamodel

a lm object. This object should use variables defined in `df`.

Value

A dataframe with the results of deterministic sensitivity analyses performed using parameter values of the linear metamodel. The dataframe contains the results using the lower and upper bound of the 95

Details

The number of element of `inputs` should equal the number of predictors included in `lm_metamodel`.

Examples

# Fitting meta modelwith two variables using the summary data
data(df_pa)
lm_res <- fit_lm_metamodel(df = df_pa,
                 y = "Inc_QALY",
                 x = c("p_pfsd", "p_pdd")
                 )
#> Error in fit_lm_metamodel(df = df_pa, y = "Inc_QALY", x = c("p_pfsd",     "p_pdd")): argument 3 matches multiple formal arguments

# Predicting using this metamodel
predict_metamodel(lm_metamodel = lm_res,
                     inputs = c(0.75, 0.2)
                     )
#> Error in predict_metamodel(lm_metamodel = lm_res, inputs = c(0.75, 0.2)): unused argument (lm_metamodel = lm_res)