What have we used so far to deal with non-linear relationships?
What have we used so far to deal with non-linear relationships?
What have we used so far to deal with non-linear relationships?
yi=β0+β1xi+β2x2i+β3x3i⋯+βdxdi+ϵi
yi=β0+β1xi+β2x2i+β3x3i⋯+βdxdi+ϵi
yi=β0+β1xi+β2x2i+β3x3i⋯+βdxdi+ϵi
^f(x0)=^β0+^β1x0+^β2x20+^β3x30+^β4x40
^f(x0)=^β0+^β1x0+^β2x20+^β3x30+^β4x40
^f(b)−^f(a)=^β1b+^β2b2+^β3b3+^β4b4−^β1a−^β2a2−^β3a3−^β4a4
^f(x0)=^β0+^β1x0+^β2x20+^β3x30+^β4x40
^f(b)−^f(a)=^β1b+^β2b2+^β3b3+^β4b4−^β1a−^β2a2−^β3a3−^β4a4
^f(b)−^f(a)=^β1(b−a)+^β2(b2−a2)+^β3(b3−a3)+^β4(b4−a4)
^f(b)−^f(a)=^β1(b−a)+^β2(b2−a2)+^β3(b3−a3)+^β4(b4−a4)
How do you pick a and b?
^f(b)−^f(a)=^β1(b−a)+^β2(b2−a2)+^β3(b3−a3)+^β4(b4−a4)
How do you pick a and b?
03:00
Polynomial Regression
pop=β0+β1age+β2age2+β3age3+β4age4+ϵ
Using the information below, write out the equation to predicted change in population from a change in age from the 25th percentile (24.5) to a 75th percentile (73.5).
term | estimate | std.error | statistic | p.value |
---|---|---|---|---|
(Intercept) | 1672.0854 | 64.5606 | 25.8995 | 0.0000 |
age | -10.6429 | 9.2268 | -1.1535 | 0.2516 |
I(age^2) | -1.1427 | 0.3857 | -2.9627 | 0.0039 |
I(age^3) | 0.0216 | 0.0059 | 3.6498 | 0.0004 |
I(age^4) | -0.0001 | 0.0000 | -3.6540 | 0.0004 |
yi=β0+β1xi+β2x2i+β3x3i⋯+βdxdi+ϵi
yi=β0+β1xi+β2x2i+β3x3i⋯+βdxdi+ϵi
Why?
What does this mean?
C1(X)=I(X<35),C2(X)=I(35≤X<65),C3(X)=I(X≥65)
C1(X)=I(X<35),C2(X)=I(35≤X<65),C3(X)=I(X≥65)
C1(X)=I(X<35),C2(X)=I(35≤X<65),C3(X)=I(X≥65)
C1(X)=I(X<15),C2(X)=I(15≤X<65),C3(X)=I(X≥65)
yi={β01+β11xi+β21x2i+β31x3i+ϵiif xi<cβ02+β12xi+β22x2i+β32x3i+ϵiif xi≥c
yi={β01+β11xi+β21x2i+β31x3i+ϵiif xi<cβ02+β12xi+β22x2i+β32x3i+ϵiif xi≥c
What could go wrong here?
yi={β01+β11xi+β21x2i+β31x3i+ϵiif xi<cβ02+β12xi+β22x2i+β32x3i+ϵiif xi≥c
What could go wrong here?
yi={β01+β11xi+β21x2i+β31x3i+ϵiif xi<cβ02+β12xi+β22x2i+β32x3i+ϵiif xi≥c
What could go wrong here?
A linear spline with knots at ξk, k=1,…,K is a piecewise linear polynomial continuous at each knot
A linear spline with knots at ξk, k=1,…,K is a piecewise linear polynomial continuous at each knot
yi=β0+β1b1(xi)+β2b2(xi)+⋯+βK+1bK+1(xi)+ϵi
A linear spline with knots at ξk, k=1,…,K is a piecewise linear polynomial continuous at each knot
yi=β0+β1b1(xi)+β2b2(xi)+⋯+βK+1bK+1(xi)+ϵi
b1(xi)=xibk+1(xi)=(xi−ξk)+,k=1,…,K
A linear spline with knots at ξk, k=1,…,K is a piecewise linear polynomial continuous at each knot
yi=β0+β1b1(xi)+β2b2(xi)+⋯+βK+1bK+1(xi)+ϵi
b1(xi)=xibk+1(xi)=(xi−ξk)+,k=1,…,K
Here ()+ means the positive part
(xi−ξk)+={xi−ξkif xi>ξk0otherwise
A cubic spliens with knots at ξi,k=1,…,K is a piecewise cubic polynomial with continuous derivatives up to order 2 at each knot.
A cubic spliens with knots at ξi,k=1,…,K is a piecewise cubic polynomial with continuous derivatives up to order 2 at each knot.
Again we can represent this model with truncated power functions
yi=β0+β1b1(xi)+β2b2(xi)+⋯+βK+3bK+3(xi)+ϵi
b1(xi)=xib2(xi)=x2ib3(xi)=x3ibk+3(xi)=(xi−ξk)3+,k=1,…,K
A cubic spliens with knots at ξi,k=1,…,K is a piecewise cubic polynomial with continuous derivatives up to order 2 at each knot.
Again we can represent this model with truncated power functions
yi=β0+β1b1(xi)+β2b2(xi)+⋯+βK+3bK+3(xi)+ϵi
b1(xi)=xib2(xi)=x2ib3(xi)=x3ibk+3(xi)=(xi−ξk)3+,k=1,…,K
where
(xi−ξk)3+={(xi−ξk)3if xi>ξk0otherwise
A natural cubic spline extrapolates linearly beyond the boundary knots
A natural cubic spline extrapolates linearly beyond the boundary knots
What have we used so far to deal with non-linear relationships?
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |