tidy.htest {broom} | R Documentation |
For models that have only a single component, the tidy()
and
glance()
methods are identical. Please see the documentation for both
of those methods.
## S3 method for class 'htest' tidy(x, ...) ## S3 method for class 'htest' glance(x, ...)
x |
An |
... |
Additional arguments. Not used. Needed to match generic
signature only. Cautionary note: Misspelled arguments will be
absorbed in |
A one-row tibble::tibble with one or more of the following columns, depending on which hypothesis test was used.
estimate |
Estimate of the effect size |
statistic |
Test statistic used to compute the p-value |
p.value |
P-value |
parameter |
Parameter field in the htest, typically degrees of freedom |
conf.low |
Lower bound on a confidence interval |
conf.high |
Upper bound on a confidence interval |
estimate1 |
Sometimes two estimates are computed, such as in a two-sample t-test |
estimate2 |
Sometimes two estimates are computed, such as in a two-sample t-test |
method |
Method used to compute the statistic as a string |
alternative |
Alternative hypothesis as a string |
tidy()
, stats::cor.test()
, stats::t.test()
,
stats::wilcox.test()
, stats::chisq.test()
Other htest tidiers:
augment.htest()
,
tidy.pairwise.htest()
,
tidy.power.htest()
tt <- t.test(rnorm(10)) tidy(tt) glance(tt) # same output for all htests tt <- t.test(mpg ~ am, data = mtcars) tidy(tt) wt <- wilcox.test(mpg ~ am, data = mtcars, conf.int = TRUE, exact = FALSE) tidy(wt) ct <- cor.test(mtcars$wt, mtcars$mpg) tidy(ct) chit <- chisq.test(xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic))) tidy(chit) augment(chit)