Published on :
Statistical CREATION_INTERNE

Paired T-Test on CAFFIENE data

This code is also available in: Deutsch Español Français
Awaiting validation
This script first creates an internal dataset containing paired measurements (baseline vs caffeine). It then uses the TTEST procedure with the 'Side = U' option to perform an upper one-sided test on the paired data.
Data Analysis

Type : CREATION_INTERNE


The data is created via the DATALINES statement in the 'CAFFIENE' DATA STEP.

1 Code Block
DATA STEP Data
Explanation :
Creation of the temporary dataset CAFFIENE containing the baseline, caffeine, and pre-calculated difference variables.
Copied!
1DATA CAFFIENE;
2INPUT baseline caffiene diff;
3DATALINES;
46.37 4.52 1.85
55.69 5.44 0.25
65.58 4.70 0.88
75.27 3.81 1.46
85.11 4.06 1.05
94.89 3.22 1.67
104.70 2.96 1.74
113.53 3.20 0.33
12;
2 Code Block
PROC TTEST
Explanation :
Execution of a paired t-test (Side=U) comparing the 'baseline' variable to the 'caffeine' variable.
Copied!
1 
2PROC TTEST Side = U;
3Paired baseline*caffiene;
4RUN;
5 
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.