| 1 |
% Generated by roxygen2: do not edit by hand |
| 2 |
% Please edit documentation in R/epiR.R |
| 3 |
\name{tidy.epi.2by2} |
| 4 |
\alias{tidy.epi.2by2} |
| 5 |
\alias{epiR_tidiers} |
| 6 |
\title{Tidy a(n) epi.2by2 object} |
| 7 |
\usage{ |
| 8 |
\method{tidy}{epi.2by2}(x, parameters = c("moa", "stat"), ...) |
| 9 |
} |
| 10 |
\arguments{ |
| 11 |
\item{x}{A \code{epi.2by2} object produced by a call to \code{\link[epiR:epi.2by2]{epiR::epi.2by2()}}} |
| 12 |
|
| 13 |
\item{parameters}{Return measures of association (\code{moa}) or test statistics (\code{stat}), |
| 14 |
default is \code{moa} (measures of association)} |
| 15 |
|
| 16 |
\item{...}{Additional arguments. Not used. Needed to match generic |
| 17 |
signature only. \strong{Cautionary note:} Misspelled arguments will be |
| 18 |
absorbed in \code{...}, where they will be ignored. If the misspelled |
| 19 |
argument has a default value, the default value will be used. |
| 20 |
For example, if you pass \code{conf.lvel = 0.9}, all computation will |
| 21 |
proceed using \code{conf.level = 0.95}. Two exceptions here are: |
| 22 |
\itemize{ |
| 23 |
\item \code{tidy()} methods will warn when supplied an \code{exponentiate} argument if |
| 24 |
it will be ignored. |
| 25 |
\item \code{augment()} methods will warn when supplied a \code{newdata} argument if it |
| 26 |
will be ignored. |
| 27 |
}} |
| 28 |
} |
| 29 |
\description{ |
| 30 |
Tidy summarizes information about the components of a model. |
| 31 |
A model component might be a single term in a regression, a single |
| 32 |
hypothesis, a cluster, or a class. Exactly what tidy considers to be a |
| 33 |
model component varies across models but is usually self-evident. |
| 34 |
If a model has several distinct types of components, you will need to |
| 35 |
specify which components to return. |
| 36 |
} |
| 37 |
\details{ |
| 38 |
The tibble has a column for each of the measures of association |
| 39 |
or tests contained in \code{massoc} or \code{massoc.detail} when \code{\link[epiR:epi.2by2]{epiR::epi.2by2()}} is called. |
| 40 |
} |
| 41 |
\examples{ |
| 42 |
\dontshow{if (rlang::is_installed("epiR")) withAutoprint(\{ # examplesIf} |
| 43 |
|
| 44 |
# load libraries for models and data |
| 45 |
library(epiR) |
| 46 |
|
| 47 |
# generate data |
| 48 |
dat <- matrix(c(13, 2163, 5, 3349), nrow = 2, byrow = TRUE) |
| 49 |
|
| 50 |
rownames(dat) <- c("DF+", "DF-") |
| 51 |
colnames(dat) <- c("FUS+", "FUS-") |
| 52 |
|
| 53 |
# fit model |
| 54 |
fit <- epi.2by2( |
| 55 |
dat = as.table(dat), method = "cross.sectional", |
| 56 |
conf.level = 0.95, units = 100, outcome = "as.columns" |
| 57 |
) |
| 58 |
|
| 59 |
# summarize model fit with tidiers |
| 60 |
tidy(fit, parameters = "moa") |
| 61 |
tidy(fit, parameters = "stat") |
| 62 |
\dontshow{\}) # examplesIf} |
| 63 |
} |
| 64 |
\seealso{ |
| 65 |
\code{\link[=tidy]{tidy()}}, \code{\link[epiR:epi.2by2]{epiR::epi.2by2()}} |
| 66 |
} |
| 67 |
\concept{epiR tidiers} |
| 68 |
\value{ |
| 69 |
A \code{\link[tibble:tibble]{tibble::tibble()}} with columns: |
| 70 |
\item{conf.high}{Upper bound on the confidence interval for the estimate.} |
| 71 |
\item{conf.low}{Lower bound on the confidence interval for the estimate.} |
| 72 |
\item{df}{Degrees of freedom used by this term in the model.} |
| 73 |
\item{p.value}{The two-sided p-value associated with the observed statistic.} |
| 74 |
\item{statistic}{The value of a T-statistic to use in a hypothesis that the regression term is non-zero.} |
| 75 |
\item{term}{The name of the regression term.} |
| 76 |
\item{estimate}{Estimated measure of association} |
| 77 |
|
| 78 |
} |