| ttestOneS {jmv} | R Documentation |
One Sample T-Test
ttestOneS(data, vars, students = TRUE, bf = FALSE, bfPrior = 0.707, wilcoxon = FALSE, testValue = 0, hypothesis = "dt", norm = FALSE, qq = FALSE, meanDiff = FALSE, effectSize = FALSE, ci = FALSE, ciWidth = 95, desc = FALSE, plots = FALSE, miss = "perAnalysis", mann = FALSE)
data |
the data as a data frame |
vars |
a vector of strings naming the variables of interest in
|
students |
|
bf |
|
bfPrior |
a number between 0.5 and 2 (default 0.707), the prior width to use in calculating Bayes factors |
wilcoxon |
|
testValue |
a number specifying the value of the null hypothesis |
hypothesis |
|
norm |
|
qq |
|
meanDiff |
|
effectSize |
|
ci |
|
ciWidth |
a number between 50 and 99.9 (default: 95), the width of confidence intervals |
desc |
|
plots |
|
miss |
|
mann |
deprecated |
A results object containing:
results$ttest | a table containing the t-test results | ||||
results$normality | a table containing the normality test results | ||||
results$descriptives | a table containing the descriptives | ||||
results$plots | an image of the descriptive plots | ||||
results$qq | an array of Q-Q plots | ||||
Tables can be converted to data frames with asDF or as.data.frame. For example:
results$ttest$asDF
as.data.frame(results$ttest)
data('ToothGrowth')
ttestOneS(ToothGrowth, vars = c('len', 'dose'))
#
# ONE SAMPLE T-TEST
#
# One Sample T-Test
# ------------------------------------------------------
# statistic df p
# ------------------------------------------------------
# len Student's t 19.1 59.0 < .001
# dose Student's t 14.4 59.0 < .001
# ------------------------------------------------------
#