Tidy summarizes information about the components of a model. A model component might be a single term in a regression, a single hypothesis, a cluster, or a class. Exactly what tidy considers to be a model component varies across models but is usually self-evident. If a model has several distinct types of components, you will need to specify which components to return.
# S3 method for epi.2by2 tidy(x, parameters = c("moa", "stat"), ...)
| x | A |
|---|---|
| parameters | Return measures of association ( |
| ... | Additional arguments. Not used. Needed to match generic
signature only. Cautionary note: Misspelled arguments will be
absorbed in |
The tibble has a column for each of the measures of association
or tests contained in massoc when epiR::epi.2by2() is called.
A tibble::tibble() with columns:
Upper bound on the confidence interval for the estimate.
Lower bound on the confidence interval for the estimate.
Degrees of freedom used by this term in the model.
The two-sided p-value associated with the observed statistic.
The value of a T-statistic to use in a hypothesis that the regression term is non-zero.
The name of the regression term.
Estimated measure of association
library(epiR)#>#>#>#>dat <- matrix(c(13, 2163, 5, 3349), nrow = 2, byrow = TRUE) rownames(dat) <- c("DF+", "DF-") colnames(dat) <- c("FUS+", "FUS-") fit <- epi.2by2( dat = as.table(dat), method = "cross.sectional", conf.level = 0.95, units = 100, outcome = "as.columns" ) tidy(fit, parameters = "moa")#> # A tibble: 13 x 4 #> term estimate conf.low conf.high #> <chr> <dbl> <dbl> <dbl> #> 1 PR.strata.wald 4.01 1.43 11.2 #> 2 PR.strata.taylor 4.01 1.43 11.2 #> 3 PR.strata.score 4.01 1.49 10.8 #> 4 OR.strata.wald 4.03 1.43 11.3 #> 5 OR.strata.cfield 4.03 NA NA #> 6 OR.strata.score 4.03 1.49 10.9 #> 7 OR.strata.mle 4.02 1.34 14.4 #> 8 ARisk.strata.wald 0.448 0.0992 0.797 #> 9 ARisk.strata.score 0.448 0.142 0.882 #> 10 PARisk.strata.wald 0.176 -0.0225 0.375 #> 11 PARisk.strata.piri 0.176 0.0389 0.314 #> 12 AFRisk.strata.wald 0.750 0.301 0.911 #> 13 PAFRisk.strata.wald 0.542 0.0361 0.782