#Example 1 - logistic regression existing model
# create a data.frame of the model coefficients, with columns being variables
coefs_table <- data.frame("Intercept" = -3.4,
"SexM" = 0.306,
"Smoking_Status" = 0.628,
"Diabetes" = 0.499,
"CKD" = 0.538)
#pass this into pred_input_info()
Existing_Logistic_Model <- pred_input_info(model_type = "logistic",
model_info = coefs_table)
summary(Existing_Logistic_Model)
#Example 2 - survival model example; uses an example dataset within the
# package.
pred_input_info(model_type = "survival",
model_info = SYNPM$Existing_TTE_models[2,],
cum_hazard = SYNPM$TTE_mod2_baseline)
#Example 3 - Input information about multiple models
summary(pred_input_info(model_type = "logistic",
model_info = SYNPM$Existing_logistic_models))
Run the code above in your browser using DataLab