powered by
This function generates the correlation matrix of input and output values of a probabilistic analysis.
generate_cor(df, vars = NULL, figure = FALSE, digits = 3)
If figure == FALSE: a matrix with summary statistics for the selected inputs and outputs. If figure == TRUE: a tile ggplot2 of the correlation matrix.
a dataframe. This dataframe contains the probabilistic inputs and outputs of the health economic model.
a vector of strings. Contains the name of the variables to include in the correlation matrix. Default is NULL meaning all variables will be included.
logical. Should the correlation matrix be plotted in a figure? Default is FALSE (no figure generated).
integer. Number of decimals to display in correlation matrix. Default is 3.
# Generating summary data of all inputs using the example dataframe data(df_pa) generate_cor(df_pa)
Run the code above in your browser using DataLab