#
ShortExperimentNames <- c("E1", "E2", "E3", "E4")
FullExperimentNames <- c("EUBAS", "R1UCLM", "R2UCLM", "R3UCLM")
Metrics <- c("Comprehension", "Modification")
Groups <- Groups <- c("A", "B", "C", "D")
Type <- c(rep("4G", 4))
StudyID <- "S2"
Control <- "SC"
# Obtain experimental data from each file and put in wide format
dataset2 <- KitchenhamEtAl.CorrelationsAmongParticipants.Scanniello14TOSEM
ReshapedData <- ExtractExperimentData(dataset2,
ExperimentNames = FullExperimentNames,
idvar = "ParticipantID", timevar = "Period", ConvertToWide = TRUE
)
# Calculate the correlations for each sequence group and each metric in each experiment
ConstructLevel1ExperimentRData(
Data = ReshapedData, StudyID = StudyID,
ExperimentNames = ShortExperimentNames, Groups = Groups, Metrics = Metrics, Type = Type,
Control = Control
)
# # A tibble: 32 x 15
# Study Exp Group Metric Id n ControlFirst var1 var2 varp
#
# 1 S2 E1 A Compr… S2E1A 6 FALSE 0.0183 0.0163 0.0173
# 2 S2 E1 B Compr… S2E1B 6 TRUE 0.0201 0.0326 0.0263
# 3 S2 E1 C Compr… S2E1C 6 FALSE 0.00370 0.0155 0.00962
# 4 S2 E1 D Compr… S2E1D 6 TRUE 0.0173 0.0201 0.0187
# 5 S2 E1 A Modif… S2E1A 6 FALSE 0.0527 0.0383 0.0455
# 6 S2 E1 B Modif… S2E1B 6 TRUE 0.0185 0.0482 0.0333
# 7 S2 E1 C Modif… S2E1C 6 FALSE 0.00655 0.0244 0.0155
# 8 S2 E1 D Modif… S2E1D 6 TRUE 0.0222 0.0266 0.0244
# 9 S2 E2 A Compr… S2E2A 6 FALSE 0.0194 0.0425 0.0309
# 10 S2 E2 B Compr… S2E2B 6 TRUE 0.0198 0.0192 0.0195
# # … with 22 more rows, and 5 more variables: ControlVarProp ,
# # VarProp , vardiff , r , r.p
Run the code above in your browser using DataLab