The goal of CompInt is to (eventually) allow users to compute all quantities from “A formal framework for generalized reporting methods in parametric settings” for a variety of model objects. Currently, this package is still in mid-development.
You can install the development version of CompInt from GitHub with:
# install.packages("pak")
pak::pak("11annah/CompInt")
# Alternatively, via devtools:
# install.packages("devtools")
devtools::install_github("11annah/CompInt")
This is a basic example which shows you how to solve a common problem:
library(CompInt)
data(Affairs, package = "AER")
poisson.model <- glm(affairs ~ ., family = "poisson", data = Affairs)
draws_gME_religiousness <- get_gME(poisson.model, integration = assumption3(all_empirical()), reg_of_interest = "religiousness", seed = 100)
mean(draws_gME_religiousness)
draws_IE_children <- get_IE(poisson.model, integration = assumption3(all_empirical()), reg_of_interest = "children", seed = 100)
rowMeans(draws_IE_children)