Linearly detrend_pupil data by fitting a linear model of pupil_data ~ time,
and return the fitted betas and the residuals (pupil_data - fitted_values).
Usage
detrend(eyeris, call_info = NULL)
Value
An eyeris object with two new columns in timeseries:
detrend_fitted_betas, and pupil_raw_{...}_detrend
Arguments
eyeris
An object of class eyeris derived from load_asc()
call_info
A list of call information and parameters. If not provided,
it will be generated from the function call. Defaults to NULL
Details
This function is automatically called by glassbox() if detrend = TRUE.
Users should prefer using glassbox() rather than invoking this function
directly unless they have a specific reason to customize the pipeline
manually.
See Also
glassbox() for the recommended way to run this step as
part of the full eyeris glassbox preprocessing pipeline