# inspect the structure of the dataframe
head(data_low_vision, 10)
# create the reading speed variable
data_low_vision <- data_low_vision %>%
mutate (rs = (10 - replace (err, err > 10, 10)) / rt * 60)
#------
# restrict dataset to one MNREAD test only (subject s1, regular polarity)
data_s1 <- data_low_vision %>%
filter (subject == "s1", polarity == "regular")
# run the parameters estimation
data_low_vision_MRS_CPS <- curveParam_RS(data_s1, ps, vd, rs)
# inspect the newly created dataframe
data_low_vision_MRS_CPS
#------
# run the parameters estimation on the whole dataset grouped by subject and polarity
data_low_vision_MRS_CPS <- curveParam_RS(data_low_vision, ps, vd, rs,
subject, polarity)
# inspect the structure of the newly created dataframe
head(data_low_vision_MRS_CPS, 10)
Run the code above in your browser using DataLab