Skip to contents

Consider a linear predictor having linear and square terms associated with a variable \(x\). Assume this variable was centered before being included in the linear predictor. This functions returns the value of \(x\) (on its original scale) such that the linear predictor is maximized (or minimized).

Usage

max_quad_x(beta1, beta2, offset = 0)

Arguments

beta1

A numeric regression coefficient associated to the linear term.

beta2

A numeric regression coefficient associated to the quadratic term.

offset

a numeric representing the "center" of \(x\).

Value

a numeric representing the uncentered \(x\) that maximizes (or minimizes) the linear predictor.

Author

Lucas Godoy