Skip to contents

regres() performs linear regression on lorenz formatted input (Beta or Quadratic). There is no intercept in the regression. The coefficients of regressions are estimated by ordinary least squares.

Usage

regres(data, is_lq = TRUE)

Arguments

data

list: Output of create_functional_form_lq() or create_functional_form_lb().

is_lq

logical: TRUE if Lorenz Quadratic, FALSE if Beta Lorenz.

Value

list

Examples

# Beta Lorenz
lb_data <- wbpip:::create_functional_form_lb(grouped_data_ex2$welfare,
grouped_data_ex2$weight)
lb_res <- wbpip:::regres(lb_data)

# Quadratic Lorenz
lq_data <- wbpip:::create_functional_form_lq(grouped_data_ex2$welfare,
grouped_data_ex2$weight)
lq_res <- wbpip:::regres(lq_data)