lm_split: Running a linear model on data frame splits

Description Usage Arguments Examples

Description

Running a linear model on data frame splits

Usage

1
lm_split(data, form, i, var_name, equal_width = TRUE, ...)

Arguments

data

Dataset for modeling

form

Formula to be passed to the linear model

i

Number of cuts to split the data into

var_name

Variable to base the cuts on

equal_width

If TRUE, cuts the data based on even widths of value; if FALSE, each cut will have an approximately equal number of observations

...

Passes lm() parameters to allow user to handle NA values

Examples

1
lm_split(comps_hypercube, "rWAR ~ cum_rwar",i = 4, "cum_rwar", na.omit = TRUE)

beanumber/mlbgm documentation built on Jan. 21, 2020, 8:33 p.m.