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