get_ratio | R Documentation |
Get the ratio between two scenarios from a simloglm object
get_ratio( input_obj, which_qoi = "median", which_scenarios = c(1, 2), alpha = 0.05 )
input_obj |
An object of class simloglm (the output of calling simloglm). With at least two scenarios. |
which_qoi |
Are you interested in the median or mean ? Default is "median". |
which_scenarios |
If you pass a simloglm object with more than two scenarios please specify which scenarios should be used. Default is c(1, 2). |
alpha |
The significance level for the resulting confidence interval. Default is 0.05. |
df <- cars regression <- lm(log(dist)~speed, data = df) # Explicitily specifying two scenarios. simulation_results <- simloglm(regression, scenario = list(speed = c(5, 20))) ratio_summary <- get_ratio(simulation_results) ratio_summary
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.