infer_ts_ind_ttest: Two Independent Sample t Test

Description Usage Arguments Value Deprecated Function References See Also Examples

View source: R/ifr-ts-ind-ttest.R

Description

infer_ts_ind_ttest compares the means of two independent groups in order to determine whether there is statistical evidence that the associated population means are significantly different.

Usage

1
2
3
4
5
6
7
8
infer_ts_ind_ttest(
  data,
  x,
  y,
  confint = 0.95,
  alternative = c("both", "less", "greater", "all"),
  ...
)

Arguments

data

a data frame

x

factor; a column in data

y

numeric; a column in data

confint

confidence level

alternative

a character string specifying the alternative hypothesis, must be one of "both" (default), "greater", "less" or "all". You can specify just the initial letter

...

additional arguments passed to or from other methods

Value

infer_ts_ind_ttest returns an object of class "infer_ts_ind_ttest". An object of class "infer_ts_ind_ttest" is a list containing the following components:

levels

levels of x

obs

number of observations of y for each level of x

n

total number of observations

mean

mean of y for each level of x

sd

standard deviation of y for each level of x

se

estimate of standard error of y for each level of x

lower

lower limit for the mean of y for each level of x

upper

upper limit for the mean of y for each level of x

combined

a data frame; mean, standard deviation, standard error and confidence limit of mean of y

mean_diff

difference in mean of y for the two groups of x

se_dif

estimate of the standard error for difference in mean of y for the two groups of x

sd_dif

degrees of freedom

conf_diff

confidence interval for mean_diff

df_pooled

degrees of freedom for the pooled method

df_satterthwaite

degrees of freedom for the Satterthwaite method

t_pooled

t statistic for the pooled method

t_satterthwaite

t statistic for the Satterthwaite method

sig_pooled

two-sided p-value for the pooled method

sig_pooled_l

lower one-sided p-value for the pooled method

sig_pooled_u

upper one-sided p-value for the pooled method

sig

two-sided p-value for the Satterthwaite method

sig_l

lower one-sided p-value for the Satterthwaite method

sig_u

upper one-sided p-value for the Satterthwaite method

num_df

numerator degrees of freedom for folded f test

den_df

denominator degrees of freedom for folded f test

f

f value for the equality of variances test

f_sig

p-value for the folded f test

var_y

name of y

confint

confidence level

alternative

alternative hypothesis

Deprecated Function

ind_ttest() has been deprecated. Instead use infer_ts_ind_ttest().

References

Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.

See Also

t.test

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# lower tail
infer_ts_ind_ttest(hsb, female, write, alternative = 'less')

# upper tail
infer_ts_ind_ttest(hsb, female, write, alternative = 'greater')

# both tails
infer_ts_ind_ttest(hsb, female, write, alternative = 'both')

# all tails
infer_ts_ind_ttest(hsb, female, write, alternative = 'all')

inferr documentation built on May 29, 2021, 1:07 a.m.