Projects the data onto the orthogonal complement of the design, returning
residuals from an OLS fit. Specialized for event_model, baseline_model,
or a raw numeric design matrix.
Arguments
- x
A design object (
event_model,baseline_model) or a numeric matrix (design matrix X).- data
A numeric vector/matrix/data.frame of observations Y with rows matching
nrow(design_matrix(x)).- cols
Optional integer or character vector selecting columns of the design to project out.
- ...
Additional arguments passed to methods.