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 htest
tidy(x, ...)# S3 method for htest
glance(x, ...)
An htest
objected, such as those created by stats::cor.test()
,
stats::t.test()
, stats::wilcox.test()
, stats::chisq.test()
, etc.
Additional arguments. Not used. Needed to match generic
signature only. Cautionary note: Misspelled arguments will be
absorbed in ...
, where they will be ignored. If the misspelled
argument has a default value, the default value will be used.
For example, if you pass conf.lvel = 0.9
, all computation will
proceed using conf.level = 0.95
. Additionally, if you pass
newdata = my_tibble
to an augment()
method that does not
accept a newdata
argument, it will use the default value for
the data
argument.
A tibble::tibble()
with columns:
Alternative hypothesis (character).
Upper bound on the confidence interval for the estimate.
Lower bound on the confidence interval for the estimate.
The estimated value of the regression term.
Sometimes two estimates are computed, such as in a two-sample t-test.
Sometimes two estimates are computed, such as in a two-sample t-test.
Method used.
The two-sided p-value associated with the observed statistic.
The parameter being modeled.
The value of a T-statistic to use in a hypothesis that the regression term is non-zero.
tidy()
, stats::cor.test()
, stats::t.test()
,
stats::wilcox.test()
, stats::chisq.test()
Other htest tidiers:
augment.htest()
,
tidy.pairwise.htest()
,
tidy.power.htest()
# NOT RUN {
tt <- t.test(rnorm(10))
tidy(tt)
# the glance output will be the same for each of the below tests
glance(tt)
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)
# }
Run the code above in your browser using DataLab