Section author: Sebastian Jentschke

From SPSS to jamovi: t-test for paired samples

After having demonstrated the beneficial effect of repeated-measures-designs on the standard error of mean, we conduct a t-test for paired samples. Using this test, we compare whether the number of mischieveous acts has increased after receiving a cloak of invisibility (variable Cloak) in comparison to the number of mischieveous acts at baseline (variable No_Cloak). This analysis is described in chapter 10.9.3 of Field (2017), especially Figure 10.12 and Output 10.8 - 10.9. We use the same data file Invisibility RM.sav which can be downloaded from the web page accompanying Andy Field’s book.

SPSS (version 27)

jamovi (version 2.0)

In SPSS you can set up a t-test for paired samples using: AnalyzeCompare meansPaired Samples T-Test.

In jamovi you do this using: Analyses (tab) → T-TestsPaired Samples T-Test

SPSS_Menu_ttestPS1

jamovi_Menu_ttestPS1

In the input window that opens, the two variables No invisibility cloak and Invisibility cloak are assigned to the field Paired variables.

In the input panel that opens, the variables No_Cloak and Cloak are moved to the variable input box Paired Variables.

SPSS_Input_ttestPS1

jamovi_Input_ttestPS1

Afterwards, we press the Options button to set the confidence interval to 95%. We, furthermore, select Exclude cases analysis by analysis (however, the latter setting only matters if we compare two pairs of variables and if those two pairs differ in for which participant those missing values occur).

In jamovi, do we go further down in the input panel and tick Mean Difference and its Confidence interval underneath. We, furthermore, tick Descriptives to obtain a output that is similar to SPSS. Finally, we set the radio box to Exclude cases analysis by analysis (the same comment as for SPSS applies; the setting won’t matter unless we compare at least two pairs of variables differing in which participants have missing values).

SPSS_Input_ttestPS2

jamovi_Input_ttestPS2

The results from SPSS and jamovi are identical, but they are arranged slightly differently. SPSS gives the mean difference (blue box) first, before giving the t-statistics and their respective degrees of freedom and p-value (red box), in jamovi it is the other way round (statistics – red box – first and mean difference – blue box – afterwards). Another table underneath (green box) gives the descriptive statistics for the two variables that were compared. Except from that jamovi also reports the Median, and a slightly different way to arrange the columns (SPSS begins with the Mean and has the N afterwards, jamovi vice versa) the two tables are identical. The numerical values for the statistics are identical: t = -3.804, df = 11, p = 0.003.

SPSS_Output_ttestPS1

jamovi_Output_ttestPS1

SPSS, in addition, gives the Paired Samples Correlation (which one typically would not report). To obtain such table, one would have to use Analyses (tab) → RegressionCorrelation Matrix and assign the variables No_Cloak and Cloak to the variable box.

If one wishes to use syntax for running those analyses, this can be done using the following commands (in jamovi with just copying to code below to Rj).

T-TEST PAIRS=No_Cloak WITH Cloak (PAIRED)
  /CRITERIA=CI(.95)
  /MISSING=ANALYSIS.
jmv::ttestPS(
    data = data,
    pairs = list(
        list(
            i1="No_Cloak",
            i2="Cloak")),
    meanDiff = TRUE,
    ci = TRUE,
    desc = TRUE)
References
Field, A. (2017). Discovering statistics using IBM SPSS statistics (5th ed.). SAGE Publications. https://edge.sagepub.com/field5e