compute_max_weight: Maximum feasible weight of the predictors

Description Usage Arguments Details Value References Examples

View source: R/carrot_functions.R

Description

Function which computes maximal weight (multiplied by the corresponding EPV rule) of a regression according to the rule of thumb applied to the outcome variable. Weight of a regression equals the sum of weights of its predictors.

Usage

1

Arguments

outi

set of outcomes

mode

indicates the mode: 'linear' (linear regression), 'binary' (logistic regression), 'multin' (multinomial regression)

Details

For continuous outcomes it equals sample size divided by 10, for multinomial it equals the size of the smallest category divided by 10

Value

returns an integer value of maximum allowed weight multiplied by 10

References

\insertRef

ref1CARRoT

Examples

1
2
3
4
5
6
7
#continuous outcomes

compute_max_weight(runif(100,0,1),'linear')

#binary outcomes

compute_max_weight(rbinom(100,1,0.4),'binary')

CARRoT documentation built on June 8, 2021, 5:09 p.m.