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

model_parameters.htest

Parameters from hypothesis tests


Description

Parameters of h-tests (correlations, t-tests, chi-squared, ...).

Usage

## S3 method for class 'htest'
model_parameters(
  model,
  cramers_v = NULL,
  phi = NULL,
  standardized_d = NULL,
  hedges_g = NULL,
  omega_squared = NULL,
  eta_squared = NULL,
  epsilon_squared = NULL,
  cohens_g = NULL,
  rank_biserial = NULL,
  rank_epsilon_squared = NULL,
  kendalls_w = NULL,
  ci = 0.95,
  bootstrap = FALSE,
  verbose = TRUE,
  ...
)

## S3 method for class 'pairwise.htest'
model_parameters(model, verbose = TRUE, ...)

Arguments

model

Object of class htest or pairwise.htest.

cramers_v, phi

Compute Cramer's V or phi as index of effect size. Can be "raw" or "adjusted" (effect size will be bias-corrected). Only applies to objects from chisq.test().

standardized_d

If TRUE, compute standardized d as index of effect size. Only applies to objects from t.test(). Calculation of d is based on the t-value (see t_to_d) for details.

hedges_g

If TRUE, compute Hedge's g as index of effect size. Only applies to objects from t.test().

omega_squared, eta_squared, epsilon_squared

Logical, if TRUE, returns the non-partial effect size Omega, Eta or Epsilon squared. Only applies to objects from oneway.test().

cohens_g

If TRUE, compute Cohen's g as index of effect size. Only applies to objects from mcnemar.test().

rank_biserial

If TRUE, compute the rank-biserial correlation as effect size measure. Only applies to objects from wilcox.test().

rank_epsilon_squared

If TRUE, compute the rank epsilon squared as effect size measure. Only applies to objects from kruskal.test().

kendalls_w

If TRUE, compute the Kendall's coefficient of concordance as effect size measure. Only applies to objects from friedman.test().

ci

Level of confidence intervals for effect size statistic. Currently only applies to objects from chisq.test() or oneway.test().

bootstrap

Should estimates be bootstrapped?

verbose

Toggle warnings and messages.

...

Arguments passed to or from other methods.

Value

A data frame of indices related to the model's parameters.

Examples

model <- cor.test(mtcars$mpg, mtcars$cyl, method = "pearson")
model_parameters(model)

model <- t.test(iris$Sepal.Width, iris$Sepal.Length)
model_parameters(model)

model <- t.test(mtcars$mpg ~ mtcars$vs)
model_parameters(model)

model <- t.test(iris$Sepal.Width, mu = 1)
model_parameters(model)

data(airquality)
airquality$Month <- factor(airquality$Month, labels = month.abb[5:9])
model <- pairwise.t.test(airquality$Ozone, airquality$Month)
model_parameters(model)

smokers <- c(83, 90, 129, 70)
patients <- c(86, 93, 136, 82)
model <- pairwise.prop.test(smokers, patients)
model_parameters(model)

parameters

Processing of Model Parameters

v0.13.0
GPL-3
Authors
Daniel Lüdecke [aut, cre] (<https://orcid.org/0000-0002-8895-3206>, @strengejacke), Dominique Makowski [aut] (<https://orcid.org/0000-0001-5375-9967>), Mattan S. Ben-Shachar [aut] (<https://orcid.org/0000-0002-4287-4801>), Indrajeet Patil [aut] (<https://orcid.org/0000-0003-1995-6531>, @patilindrajeets), Søren Højsgaard [aut], Zen J. Lau [ctb], Vincent Arel-Bundock [ctb] (<https://orcid.org/0000-0003-1995-6531>, @vincentab), Jeffrey Girard [ctb] (<https://orcid.org/0000-0002-7359-3746>, @jeffreymgirard)
Initial release

We don't support your browser anymore

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