This is an internal function called by format_stats(), which we
recommend using instead.
Usage
format_chisq(
x,
digits = 1,
pdigits = 3,
pzero = FALSE,
italics = TRUE,
dfs = "par",
type = "md"
)Arguments
- x
An
htestobject fromcor.test(),t.test(), orwilcox.test().- digits
Number of digits after the decimal for means, confidence intervals, and test statistics.
- pdigits
Number of digits after the decimal for p-values, ranging between 1-5 (also controls cutoff for small p-values).
- pzero
Logical value (default = FALSE) for whether to include leading zero for p-values.
- italics
Logical value (default = TRUE) for whether p label should be italicized.
- dfs
Formatting for degrees of freedom ("par" = parenthetical, "sub" = subscript, "none" = do not print degrees of freedom).
- type
Type of formatting ("md" = markdown, "latex" = LaTeX).
See also
Other functions for printing statistical objects:
format_bf(),
format_corr(),
format_stats(),
format_stats.BFBayesFactor(),
format_stats.aov(),
format_stats.easycorrelation(),
format_stats.htest(),
format_stats.lm(),
format_stats.lmerModLmerTest(),
format_stats.merMod(),
format_ttest()
Examples
format_stats(chisq.test(matrix(c(12, 5, 7, 7), ncol = 2)))
#> [1] "𝜒²(1) = 0.6, _p_ = .423"
