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

# S3 method for 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 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 effectsize::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)
#> Pearson's product-moment correlation
#> 
#> Parameter1 | Parameter2 |     r |         95% CI | t(30) |      p
#> -----------------------------------------------------------------
#> mtcars$mpg | mtcars$cyl | -0.85 | [-0.93, -0.72] | -8.92 | < .001
#> 
#> Alternative hypothesis: true correlation is not equal to 0
#> 

model <- t.test(iris$Sepal.Width, iris$Sepal.Length)
model_parameters(model)
#> Welch Two Sample t-test
#> 
#> Parameter1       |        Parameter2 | Mean_Parameter1 | Mean_Parameter2 | Difference |         95% CI | t(225.68) |      p
#> ---------------------------------------------------------------------------------------------------------------------------
#> iris$Sepal.Width | iris$Sepal.Length |            3.06 |            5.84 |      -2.79 | [-2.94, -2.64] |    -36.46 | < .001
#> 
#> Alternative hypothesis: true difference in means is not equal to 0
#> 

model <- t.test(mtcars$mpg ~ mtcars$vs)
model_parameters(model)
#> Welch Two Sample t-test
#> 
#> Parameter  |     Group | mtcars$vs = 0 | mtcars$vs = 1 | Difference |          95% CI | t(22.72) |      p
#> ---------------------------------------------------------------------------------------------------------
#> mtcars$mpg | mtcars$vs |         16.62 |         24.56 |      -7.94 | [-11.46, -4.42] |    -4.67 | < .001
#> 
#> Alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
#> 

model <- t.test(iris$Sepal.Width, mu = 1)
model_parameters(model)
#> One Sample t-test
#> 
#> Parameter        | Mean |   mu | Difference |       95% CI | t(149) |      p
#> ----------------------------------------------------------------------------
#> iris$Sepal.Width | 3.06 | 1.00 |       2.06 | [2.99, 3.13] |  57.81 | < .001
#> 
#> Alternative hypothesis: true mean is not equal to 1
#> 

data(airquality)
airquality$Month <- factor(airquality$Month, labels = month.abb[5:9])
model <- pairwise.t.test(airquality$Ozone, airquality$Month)
model_parameters(model)
#> # Fixed Effects
#> 
#> Group1 | Group2 |      p
#> ------------------------
#> Jun    |    May | > .999
#> Jul    |    May | < .001
#> Jul    |    Jun | 0.051 
#> Aug    |    May | < .001
#> Aug    |    Jun | 0.050 
#> Aug    |    Jul | > .999
#> Sep    |    May | > .999
#> Sep    |    Jun | > .999
#> Sep    |    Jul | 0.005 
#> Sep    |    Aug | 0.004 
#> 
#> p-value adjustment method: Holm (1979)
#> 

smokers <- c(83, 90, 129, 70)
patients <- c(86, 93, 136, 82)
model <- pairwise.prop.test(smokers, patients)
#> Warning: Chi-squared approximation may be incorrect
#> Warning: Chi-squared approximation may be incorrect
#> Warning: Chi-squared approximation may be incorrect
model_parameters(model)
#> # Fixed Effects
#> 
#> Group1 | Group2 |      p
#> ------------------------
#> 2      |      1 | > .999
#> 3      |      1 | > .999
#> 3      |      2 | > .999
#> 4      |      1 | 0.119 
#> 4      |      2 | 0.093 
#> 4      |      3 | 0.124 
#> 
#> p-value adjustment method: Holm (1979)
#>