Description Usage Arguments Details Value References Examples

View source: R/carrot_functions.R

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.

1 | ```
compute_max_weight(outi,mode)
``` |

`outi` |
set of outcomes |

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

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

returns an integer value of maximum allowed weight multiplied by 10

ref1CARRoT

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')
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.