Test cost sensitivity using PRCC

test_prcc(df = NULL, obs = NULL, target_time = NULL)

Arguments

df

A dataframe

obs

A character string containing the observation to use to calculate the PRCC.

target_time

Numeric, the time at which to estimate the model sensitivity. If not specified then this will default to the last fitted point that the model has produced output for.

Value

A data frame containing the names of the parameters in the model, the correlation with the outcome and the p value of this correlation

Examples

## Code test_prcc
#> function (df = NULL, obs = NULL, target_time = NULL) #> { #> time <- NULL #> value <- NULL #> Parameter <- NULL #> p.value <- NULL #> params <- df %>% dplyr::filter(time == target_time) %>% select_if(~var(.) > #> 0) #> sample <- params %>% bind_cols(obs %>% select(value) %>% #> setNames("Observation")) #> prcc <- epi.prcc(sample) %>% mutate(Parameter = colnames(params)) %>% #> select(Parameter, gamma, p.value) %>% arrange(desc(abs(gamma))) #> return(prcc) #> } #> <bytecode: 0x67e99f0> #> <environment: namespace:ceplotr>