Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

qi_slimmer

Find the median and a central interval of simulated quantity of interest distributions


Description

Find the median and a central interval of simulated quantity of interest distributions

Usage

qi_slimmer(df, qi_type = "ev", ci = 0.95)

Arguments

df

a tidy-formatted data frame of simulated quantities of interest created by zelig_qi_to_df.

qi_type

character string either ev or pv for returning the central intervals for the expected value or predicted value, respectively.

ci

numeric. The central interval to return, expressed on the (0, 100] or the equivalent (0, 1] interval.

Details

A tidy-formatted data frame with the following columns:

  • The values fitted with setx

  • qi_ci_min: the minimum value of the central interval specified with ci

  • qi_ci_median: the median of the simulated quantity of interest distribution

  • qi_ci_max: the maximum value of the central interval specified with ci

Author(s)

Christopher Gandrud

See Also

Examples

library(dplyr)
qi.central.interval <- zelig(Petal.Width ~ Petal.Length + Species,
             data = iris, model = "ls") %>%
             setx(Petal.Length = 2:4, Species = "setosa") %>%
             sim() %>%
             zelig_qi_to_df() %>%
             qi_slimmer()

Zelig

Everyone's Statistical Software

v5.1.7
GPL (>= 3)
Authors
Christine Choirat [aut], Christopher Gandrud [aut], James Honaker [aut], Kosuke Imai [aut], Gary King [aut], Olivia Lau [aut], Robert Treacy [aut, cre], IQSS Harvard University [cph]
Initial release
2020-12-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.