get_ratio: Get the ratio between two scenarios from a simloglm object

View source: R/get_ratio.R

get_ratioR Documentation

Get the ratio between two scenarios from a simloglm object

Description

Get the ratio between two scenarios from a simloglm object

Usage

get_ratio(
  input_obj,
  which_qoi = "median",
  which_scenarios = c(1, 2),
  alpha = 0.05
)

Arguments

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.

Examples

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

mneunhoe/simloglm documentation built on June 14, 2022, 5:18 p.m.