View source: R/make_smoothed_data.R
regress_data | R Documentation |
regress_data runs a simple linear regression of pupil1 against pupil2 and the reverse. This can help to account for small amount of bumpiness in the data. The regression runs over each participant and each trial, per time.
regress_data(data, pupil1, pupil2)
data |
a PupillometryR dataframe |
pupil1 |
Column name for first pupil data |
pupil2 |
Column name for second pupil data |
a PupillometryR dataframe with smoothed pupil values
Sdata <- make_pupillometryr_data(data = pupil_data,
subject = ID,
trial = Trial,
time = Time,
condition = Type)
regressed_data <- regress_data(data = Sdata,
pupil1 = RPupil,
pupil2 = LPupil)
mean_data <- calculate_mean_pupil_size(data = regressed_data,
pupil1 = RPupil, pupil2 = LPupil)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.