idt: Generate Output for an Independent t-test

View source: R/idt.R

idtR Documentation

Generate Output for an Independent t-test

Description

This function will generate the output for an independent t-test.

Usage

idt(x, y = NULL, tails = 2)

Arguments

x

A formula dependent variable ~ dependent variable, a data frame variable can also be passed in.

y

A data frame, necessary if data frame is not referenced in formula or piped in, if a data frame variable is passed in to x, a data frame variable will also be accepted.

tails

An integer indicating whether the test is one-tailed '1' or two-tailed '2'

Value

A list of output for reporting $analysis_type, $results, $descriptive_statistics

Examples

idt_results <- idt_data %>% idt(scones ~ tea)
idt_results <- idt(idt_data$scones ~ idt_data$tea, tails = 1)
idt_results <- idt(scones ~ tea, idt_data)
idt_results <- idt(idt_data, scones ~ tea)

ECO230/eco230r documentation built on Feb. 26, 2025, 2:45 p.m.