Create a summary table for a one-sample proportion interval
Source:R/infer_prop.R
infer_1prop_int.Rd
Create a summary table for a one-sample proportion interval
Arguments
- data
A data frame (or tibble).
- formula
The variable to run the test on, in formula syntax,
~var
.- success
The data value that constitutes a "success".
- digits
The number of digits to round table values to. Defaults to 3.
- conf_lvl
The confidence level of the interval, entered as a value between 0 and 1. Defaults to 0.95.
An override to the table caption. A sensible default is provided.
Value
An object of class flextable. In an interactive environment, results are viewable immediately.
Examples
infer_1prop_int(mtcars, ~vs, success = 1)
One-Sample Proportion Confidence Interval on Variable vs
Successes: 1
Confidence Level: 95% n
Successes
n
Missing
n
p̂
Standard
Error
95%
Interval
Lower
95%
Interval
Upper
14
0
32
0.438
0.0877
0.266
0.609
infer_1prop_int(mtcars, ~vs, success = 1, conf_lvl = 0.90)
One-Sample Proportion Confidence Interval on Variable vs
Successes: 1
Confidence Level: 90% n
Successes
n
Missing
n
p̂
Standard
Error
90%
Interval
Lower
90%
Interval
Upper
14
0
32
0.438
0.0877
0.293
0.582