Learn R Programming

pvEBayes (version 0.2.1)

extract_all_fitted_models: Extract all fitted models from a tuned pvEBayes Object

Description

This function retrieves the list of all fitted models from a pvEBayes_tuned object, which is the output of the pvEBayes_tune() function.

Usage

extract_all_fitted_models(object)

Value

A list containing the results of each model fitted during the tuning process.

Arguments

object

An object of class pvEBayes_tuned, usually returned by pvEBayes_tune. This function will throw an error if the input is not of the correct class.

Examples

Run this code

valid_matrix <- matrix(c(1, 2, 3, 4, 5, 6, 7, 8), nrow = 2)
rownames(valid_matrix) <- c("AE_1", "AE_2")
colnames(valid_matrix) <- c("drug_1", "drug_2", "drug_3", "drug_4")

tuned_object <- pvEBayes_tune(valid_matrix,
  model = "general-gamma",
  return_all_fit = TRUE
)
extract_all_fitted_models(tuned_object)

Run the code above in your browser using DataLab