residualize_outcome: Function to residualize out covariates from a given dataset.

Description Usage Arguments

View source: R/residualize_outcome.R

Description

This function regresses an outcome on a given set of covariates and obtains and stores the residual for each observation.

Usage

1
2
residualize_outcome(input_data, outcome_var, discrete_vars,
  continuous_vars, weight_var = NULL)

Arguments

input_data

The data containing the outcome and covariates (data.table).

outcome_var

The name of the outcome variable (character).

discrete_vars

A list of discrete covariates (character).

continuous_vars

A list of continuous variables (character).

weight_var

(optional) The name of the weight variable, if the regression is to be weighted (character).


johnnybonney/sales.taxes documentation built on Dec. 18, 2018, 2:37 a.m.