inference: Hypothesis tests and confidence intervals

Description Usage Arguments Value

View source: R/inference.R

Description

Hypothesis tests and confidence intervals

Usage

1
2
3
4
5
6
7
8
inference(y, x = NULL, data, type = c("ci", "ht"), statistic = c("mean",
  "median", "proportion"), success = NULL, order = NULL,
  method = c("theoretical", "simulation"), null = NULL,
  alternative = c("less", "greater", "twosided"), sig_level = 0.05,
  conf_level = 0.95, boot_method = c("perc", "se"), nsim = 15000,
  seed = NULL, verbose = TRUE, show_var_types = verbose,
  show_summ_stats = verbose, show_eda_plot = verbose,
  show_inf_plot = verbose, show_res = verbose)

Arguments

y

Response variable, can be numerical or categorical

x

Explanatory variable, categorical (optional)

data

Name of data frame that y and x are in

type

of inference; "ci" (confidence interval) or "ht" (hypothesis test)

statistic

parameter to estimate: mean, median, or proportion

success

which level of the categorical variable to call "success", i.e. do inference on

order

when x is given, order of levels of x in which to subtract parameters

method

of inference; "theoretical" (CLT based) or "simulation" (randomization/bootstrap)

null

null value for a hypothesis test

alternative

direction of the alternative hypothesis; "less","greater", or "twosided"

sig_level

significance level, value between 0 and 1 (used only for ANOVA to determine if posttests are necessary)

conf_level

confidence level, value between 0 and 1

boot_method

bootstrap method; "perc" (percentile) or "se" (standard error)

nsim

number of simulations

seed

seed to be set, default is NULL

verbose

whether output should be verbose or not, default is TRUE

show_var_types

print variable types, set to verbose by default

show_summ_stats

print summary stats, set to verbose by default

show_eda_plot

print EDA plot, set to verbose by default

show_inf_plot

print inference plot, set to verbose by default

show_res

print results, set to verbose by default

Value

Results of inference task performed


andrewpbray/reed-oilabs documentation built on April 8, 2020, 2:26 a.m.