Non-linear relationships Flashcards
How to find x-value that maximizes y-hat
Take derivative of quadratic and set it equal to 0, then solve for x
Slope of quadratic
Take derivative:
Beta 1 hat + 2 Beta 2 hat*x
B1 with quadratic
estimated slope when x = 0
B2 with quadratic
magnitude of the change in slope
for every one unit change in x, slope is expected to change by 2B-2hat
Weakness of quadratic function
sign of the slope will flip flop from positive to negative which is harmful when measure some things, e.g. the optimal level of cholesterol to maximize health, or the relationship between happiness and wages
Log functions
slope is always positive but it decreases as x increases, it will eventually get flat
Level-level
^y = B0 + B1x
every 1 unit increase in x is predicted to change y by B1 units.
Level-log
^y = B0 + log(x)B1
every 1% increase in x is predicted to increase y by B1 / 100 units
Log-level
log(^y) = B0 + B1x
Every 1 unit increase in x is predicted to increase y by B1*100 percent
Log-log
log(^y) = B0 + log(x)B1
Every 1% increase in x is predicted to increase y by B1%
When to use logs
If y and x have a positive relationship but at some point there’s a diminishing marginal return.