Description Usage Arguments Details Value Author(s) Examples
R implementation of the SPSS T-TEST
function.
1 2 3 |
x |
a (non-empty) data.frame or input data of class |
variables |
atomic character or character vector with the names of the variables. |
t_test |
atomic character definies the type of t-test. Default is |
testval |
atomic numeric which indicates the value of mean difference. |
criteria |
atomic numeric which specifies the confidence interval for the mean differences. Default
is |
groupvar |
atomic character with the name of the variable which shall be used for grouping. |
groups |
factor variable which specify the variables grouped for an independentsample t-test. |
withvars |
atomic characters or character vector with the name of the paired variables which shall be used for compare the means. Optionally
the argument |
paired |
logical. Indicating whether the comparison should be pair based or not. |
missing |
atomic character determines the method which indicates what should happen when the data contains NAs. Default is analysis.
Optionally |
Performs a Student's T-Test. The xpssTtest
compares the mean by calculating Students-t of the selected distributions.
It is possible to check the samples.
against a specific value (one-sample) -> testval
in difference of groups (independent-sample)-> groups
in difference of variables (paired-sample) -> pairs
Simple statistics will be printed with every t-test.
At the one-sample test, the mean difference will be visualized with the statistics
At the independend-sample test, the mean differnce and ANOVA will be visualized with the statistics
At the paired-sample test, the mean diference and a correlation statistic will be visualizied with the statistics
returns a list depending upon the t-test.
All t-test contain:
statistics | simple statistics. | |
parameter | degrees of freedom. | |
p.value | significance level. | |
conf.int | confidence bound. | |
null.value | value of null hypothesis. | |
alternative | value of alternative hypothesis. | |
method | character string with the name of the t-test. | |
data.name | name of the data. |
The independent t-test includes additonally:
anova | anova of the groups. |
The paired t-test includes additonally:
corr | correlation of the pairs. |
Bastian Wiessner
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | data(fromXPSS)
xpssTtest(fromXPSS,
variables = "V7_2",
t_test = "testval",
testval= 50,
criteria = 0.65)
xpssTtest(fromXPSS,
t_test = "pairs",
variables=c("V5",
"V6",
"V7_1",
"V7_2"),
paired = FALSE,
missing = "analysis",
criteria = 0.85)
xpssTtest(fromXPSS,
variables = "V7_2",
t_test = "groups",
groupvar = "V3",
groups = c(1, 2),
missing = "analysis",
criteria = 0.99)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.