R and SAS code to perform a nested t-test
Prism 8 introduces nested t-tests, to deal with data that have both actual replicates and technical replicates. "Nested t-test" is not standard jargon. Prism does the calculations by fitting a mixed-effects model. This FAQ provides R and SAS code to show your statistical consultants, so they can understand precisely what Prism is doing.
Download the data file used by R and SAS. ttest_nested.maxwell_16_4.csv
SAS code
PROC IMPORT DATAFILE=REFFILE
DBMS=CSV
OUT=gsData;
GETNAMES=YES;
RUN;
PROC MIXED data=gsData METHOD=REML;
CLASS _Room _Condition;
MODEL _Inductive = _Condition;
RANDOM _Room*_Condition / SUBJECT=_Room;
RUN;
R code
options(contrasts = c("contr.sum","contr.poly"))
teachingData<-read.csv("ttest_nested.maxwell_16_4.csv")
model<-lmer(Inductive ~ Condition + (1|Room:Condition),
data = teachingData, REML = TRUE)
summary(model)
anova(model)
Source