Debian Codegraph @

man/tidy.htest.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/stats-htest.R
3 \name{tidy.htest}
4 \alias{tidy.htest}
5 \alias{htest_tidiers}
6 \alias{glance.htest}
7 \title{Tidy/glance a(n) htest object}
8 \usage{
9 \method{tidy}{htest}(x, ...)
10
11 \method{glance}{htest}(x, ...)
12 }
13 \arguments{
14 \item{x}{An \code{htest} objected, such as those created by \code{\link[stats:cor.test]{stats::cor.test()}},
15 \code{\link[stats:t.test]{stats::t.test()}}, \code{\link[stats:wilcox.test]{stats::wilcox.test()}}, \code{\link[stats:chisq.test]{stats::chisq.test()}}, etc.}
16
17 \item{...}{Additional arguments. Not used. Needed to match generic
18 signature only. \strong{Cautionary note:} Misspelled arguments will be
19 absorbed in \code{...}, where they will be ignored. If the misspelled
20 argument has a default value, the default value will be used.
21 For example, if you pass \code{conf.lvel = 0.9}, all computation will
22 proceed using \code{conf.level = 0.95}. Two exceptions here are:
23 \itemize{
24 \item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if
25 it will be ignored.
26 \item \code{augment()} methods will warn when supplied a \code{newdata} argument if it
27 will be ignored.
28 }}
29 }
30 \description{
31 For models that have only a single component, the \code{\link[=tidy]{tidy()}} and
32 \code{\link[=glance]{glance()}} methods are identical. Please see the documentation for both
33 of those methods.
34 }
35 \examples{
36
37 tt <- t.test(rnorm(10))
38
39 tidy(tt)
40
41 # the glance output will be the same for each of the below tests
42 glance(tt)
43
44 tt <- t.test(mpg ~ am, data = mtcars)
45
46 tidy(tt)
47
48 wt <- wilcox.test(mpg ~ am, data = mtcars, conf.int = TRUE, exact = FALSE)
49
50 tidy(wt)
51
52 ct <- cor.test(mtcars$wt, mtcars$mpg)
53
54 tidy(ct)
55
56 chit <- chisq.test(xtabs(Freq ~ Sex + Class, data = as.data.frame(Titanic)))
57
58 tidy(chit)
59 augment(chit)
60
61 }
62 \seealso{
63 \code{\link[=tidy]{tidy()}}, \code{\link[stats:cor.test]{stats::cor.test()}}, \code{\link[stats:t.test]{stats::t.test()}},
64 \code{\link[stats:wilcox.test]{stats::wilcox.test()}}, \code{\link[stats:chisq.test]{stats::chisq.test()}}
65
66 Other htest tidiers:
67 \code{\link{augment.htest}()},
68 \code{\link{tidy.pairwise.htest}()},
69 \code{\link{tidy.power.htest}()}
70 }
71 \concept{htest tidiers}
72 \value{
73 A \code{\link[tibble:tibble]{tibble::tibble()}} with columns:
74 \item{alternative}{Alternative hypothesis (character).}
75 \item{conf.high}{Upper bound on the confidence interval for the estimate.}
76 \item{conf.low}{Lower bound on the confidence interval for the estimate.}
77 \item{estimate}{The estimated value of the regression term.}
78 \item{estimate1}{Sometimes two estimates are computed, such as in a two-sample t-test.}
79 \item{estimate2}{Sometimes two estimates are computed, such as in a two-sample t-test.}
80 \item{method}{Method used.}
81 \item{p.value}{The two-sided p-value associated with the observed statistic.}
82 \item{parameter}{The parameter being modeled.}
83 \item{statistic}{The value of a T-statistic to use in a hypothesis that the regression term is non-zero.}
84
85 }