infer_ts_paired_ttest {inferr} | R Documentation |
Paired t test
Description
infer_ts_paired_ttest
tests that two samples have the
same mean, assuming paired data.
Usage
infer_ts_paired_ttest(
data,
x,
y,
confint = 0.95,
alternative = c("both", "less", "greater", "all")
)
Arguments
data |
a |
x |
numeric; column in |
y |
numeric; column in |
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 |
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 |
corsig |
p-value of correlation test |
conf_int1 |
confidence interval for mean of |
conf_int2 |
confidence interval for mean of |
conf_int_diff |
confidence interval for mean of difference of |
df |
degrees of freedom |
confint |
confidence level |
alternative |
alternative hypothesis |
var_names |
names of |
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
Examples
# 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')