Description Usage Arguments Details Value Author(s) Examples
Calculates and displays two sample t-test with intermediate calculations
1 2 3 4 5 6 7 | t_test(xbar,sd,n,var.equal=F,alpha=0.05,alternative = c("two.sided",
"less", "greater"), method = c("p.value", "conf.int", "crit.val"))
S3 method for formula
t_test(formula,data,subset,var.equal=F,alpha=0.05,alternative = c("two.sided",
"less", "greater"), method = c("p.value", "conf.int", "crit.val"))
|
xbar |
vector containing the two sample means |
sd |
vector of two sample standard deviations |
n |
vector of sample size for both samples |
formula |
standard formula argument of the form response~group |
data |
data set to use for analysis |
subset |
vector specifying the observations to be used |
var.equal |
logical specifying whether to assume equality of variances |
alpha |
specification of the Type I error rate |
alternative |
string indicating whether to conduct a two-sided or a single sided alternative |
method |
string indicating whether to use the p-value, critical value, or confidence interval approach to carry out the test |
This function performs the standard two sample t-test but includes in the output all of the intermediate details including the critical values, the degrees of freedom, and the pooled standard deviation. The output is displayed using the Hypothesis testing logic/framework.
t_test writes out the standard notation for the hypotheses for the population mean. Next it displays the appropriate decision rule for each of the different methods. Then the function returns the summary statistics and all the nescicary calculations. Finally, it states the statistical conclusion in terms of the hypotheses.
Timothy Hess hesst@ripon.edu
1 2 3 4 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.