Skip to contents

Create a summary table for a one-sample mean interval

Usage

infer_1mean_int(data, formula, digits = 3, conf_lvl = 0.95, caption = NULL)

Arguments

data

A data frame (or tibble).

formula

The variable to run the test on, in formula syntax, ~var.

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.

caption

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_1mean_int(mtcars, ~wt)
#> Registered S3 method overwritten by 'mosaic':
#>   method                           from   
#>   fortify.SpatialPolygonsDataFrame ggplot2
One-Sample Mean Confidence Interval on Variable wt

n

n
Missing

df

Standard
Error

95%
Interval
Lower

95%
Interval
Upper

32

0

3.217

31

0.173

2.864

3.570

infer_1mean_int(mtcars, ~wt, conf_lvl = .9)
One-Sample Mean Confidence Interval on Variable wt

n

n
Missing

df

Standard
Error

90%
Interval
Lower

90%
Interval
Upper

32

0

3.217

31

0.173

2.924

3.511