`infer_2mean()`

is an alternative to `infer_2mean_test()`

and `infer_2mean_int()`

. Rather than have
hypothesis test and confidence interval output split into two separate functions, you can now do it
in one. For just a hypothesis test, do nothing different from `infer_2mean_test()`

(except change
the function name). For a confidence interval provided with that, use `conf_int = "show`

.

## Usage

```
infer_2mean(
data,
formula,
digits = 3,
conf_lvl = 0.95,
conf_int = c("hide", "show"),
caption = NULL
)
```

## Arguments

- data
A data frame (or tibble).

- formula
The variables to run the test on, in formula syntax,

`var1 ~ var2`

.- 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.

- conf_int
Should a confidence interval be provided in addition to the hypothesis test output? Defaults to "hide" with the other option being "show".

An override to the table caption. A sensible default is provided.

## Examples

```
infer_2mean(mtcars, wt~vs)
```Two Sample Independent Means Test Between wt and vs

Confidence Level: 95% vs

n

n

Missing

Group

Means

Standard

Error

t

df

p-value

0

18

0

3.689

0.286

3.764

29.981

0.000728

1

14

0

2.611

infer_2mean(mtcars, wt~vs, conf_lvl = .9)
Two Sample Independent Means Test Between wt and vs

Confidence Level: 90% vs

n

n

Missing

Group

Means

Standard

Error

t

df

p-value

0

18

0

3.689

0.286

3.764

29.981

0.000728

1

14

0

2.611

infer_2mean(mtcars, wt~vs, conf_lvl = .9, conf_int = "show")
Two Sample Independent Means Test Between wt and vs

Confidence Level: 90% vs

n

n

Missing

Group

Means

Standard

Error

t

df

p-value (2 tail)

90%

Interval

Lower

90%

Interval

Upper

0

18

0

3.689

0.286

3.764

29.981

0.000728

0.591

1.563

1

14

0

2.611