make_cont_table: Create Contigency Values

Description Usage Arguments

View source: R/make_cont_table.R

Description

Provide a model, newdata and some other values and this function hopefully creates a contigency matrix like dataframe

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
make_cont_table(
  model,
  new_data,
  cm = TRUE,
  x_var = "duration",
  y_var = "sum_rain",
  true_class = "class",
  trigger = "trigger",
  notrigger = "notrigger",
  quantiles = seq(0, 1, by = 0.01)
)

Arguments

model

The Model

new_data

A dataframe with the newdata to apply the model (must have the predictors from the model) as columns. Otherwise will hopefully throw an error

cm

If TRUE will output a "short" daatframe and only contain the count of the contigency values. If FALSE will add to each obsevation the contigency value

x_var

The name of the column of the Predictor in our model

y_var

The name of the column of the dependent variables (cumulated rainfall, intensity)

true_class

Name of the column that hold the binary "true" values

trigger

The representation of the true (postive) value in the true_class column

notrigger

The representation of the false (negative) value in the true_class column

quantiles

...


RobinKohrs/rainfallR documentation built on Oct. 3, 2021, 1:42 a.m.