infer_ts_paired_ttest: Paired t test

Description Usage Arguments Value Deprecated Function References See Also Examples

View source: R/infer-ts-paired-ttest.R

Description

infer_ts_paired_ttest tests that two samples have the same mean, assuming paired data.

Usage

1
2
infer_ts_paired_ttest(data, x, y, confint = 0.95, alternative = c("both",
  "less", "greater", "all"))

Arguments

data

a data.frame or tibble

x

numeric; column in data

y

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

Value

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

Obs

number of observations

b

mean, standard deviation and standard error of x, y and their difference

tstat

t statistic

p_lower

lower one-sided p-value

p_upper

upper one-sided p-value

p_two_tail

two sided p-value

corr

Correlation of x and y

corsig

p-value of correlation test

conf_int1

confidence interval for mean of x

conf_int2

confidence interval for mean of y

conf_int_diff

confidence interval for mean of difference of x and y

df

degrees of freedom

confint

confidence level

alternative

alternative hypothesis

var_names

names of x and y

xy

string used in printing results of the test

Deprecated Function

paired_ttest() has been deprecated. Instead use infer_ts_paired_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_paired_ttest(hsb, read, write, alternative = 'less')

# upper tail
infer_ts_paired_ttest(hsb, read, write, alternative = 'greater')

# both tails
infer_ts_paired_ttest(hsb, read, write, alternative = 'both')

# all tails
infer_ts_paired_ttest(hsb, read, write, alternative = 'all')

inferr documentation built on May 2, 2019, 6:23 a.m.