Paired t–test | Paired t-test in R
Pairedt-testscanbeconductedwiththet.testfunctioninthenativestatspackageusingthepaired=TRUEoption. Datacanbeinlongformatorshortformat. Examplesofeachareshowninthischapter. Asanon-parametricalternativetopairedt-tests,apermutationtestcanbeused. Anexampleisshowninthe“Permutationtestfordependentsamples”sectionofthischapter. ExamplesinSummaryandAnalysisofExtensionProgramEvaluationSAEEPER:Pairedt-test[1]SAEEPER:One-wayPermutationTestofSymmetryforPairedOrdinalData[2] PackagesusedinthischapterThefoll...
Paired t-tests can be conducted with the t.test function in the native stats package using the paired=TRUE option. Data can be in long format or short format. Examples of each are shown in this chapter.
As a non-parametric alternative to paired t-tests, a permutation test can be used. An example is shown in the “Permutation test for dependent samples” section of this chapter.
Examples in Summary and Analysis of Extension Program Evaluation
SAEEPER: Paired t-test[1]
SAEEPER: One-way Permutation Test of Symmetry for Paired Ordinal Data[2]
Packages used in this chapter
The following commands will install these packages if they are not already installed:
if(!require(ggplot2)){install.packages("ggplot2")}if(!require(coin)){install.packages("coin")}...