Skip to contents

Given a data_list to correct and another data_list of categorical features to linearly adjust for, corrects the first data_list based on the residuals of the linear model relating the numeric features in the first data_list to the unwanted signal features in the second data list.

Usage

linear_adjust(data_list, unwanted_signal_list, sig_digs = NULL)

Arguments

data_list

A nested list of input data from generate_data_list().

unwanted_signal_list

A data_list of categorical features that should have their mean differences removed in the first data_list.

sig_digs

Number of significant digits to round the residuals to.

Value

A data list ("list") in which each data component has been converted to contain residuals off of the linear model built against the features in the unwanted_signal_list.