Linear regression can be modified when the relationship between the predictors and the response is non-linear. This can be expressed as a polynomial function of the form: \[y_i = \beta_0 + \beta_1x_i + \beta_2 x_{2i} + ...... + \beta_d x_{di} + \epsilon_i \]
For large values of d, polynomial regression can produce extremely non-linear curves, but a d greater than 3 or 4 is unusual as large values of d can be overly flexible. The coefficients in polynomial regression can be estimated using least squares linear regression, and individually they are less important compared to the overall fit of the model and the perspective it provides on the relationship between the predictors and the response. Least squares can also be used to estimate the variance of each coefficient as well as the covariance between coefficient pairs.
Step functions split the range of X into bins and fit a different constant to each bin, similar to converting a continuous variable into an ordered categorical variable. First, \(K\) cut points, \(c_1,c_2,...,c_k\), are created in the range of \(X\) from which \(K+1\) new variables are created.
\[C_0(X)=I(X<C_1)\] \[C_1(X)=I(C_2≤X≤C_3)\] \[...\] \[C_{K−1}(X)=I(C_{K−1}≤X≤C_K)\] \[C_K=I(C_K≤X)\]
where \(I\) is an indicator function that returns 1 if the condition is true. For any value of \(X\), \(C_0(X)+C_1(X)+. . .+C_K(X) = 1\), since \(X\) must be in exactly one of the \(K + 1\) intervals. A linear model is fit using \(C_0(X), C_1(X), ... , C_K(X)\) as predictors: \[ y_i = \beta_0 + \beta_1 C_1 (x_i) + ....... + \beta_k C_k (x_i) + \epsilon_i \]
When \(X < C\), all the predictors will be zero, so \(\beta_0\) can be interpreted as the mean value of Y for X < C1. Similarly, for \(C_j ≤ X < C_{j+1}\), the linear model reduces to \(\beta_0 + \beta_j\), so \(\beta_j\) represents the average increase in the response for \(X\) in \(C_j ≤ X < C_{j+1}\) compared to \(X < C_1\).
The basis function approach utilizes a family of functions or transformations that can be applied to a variable \(X: b_1(X), b_2(X), ... , b_K(X)\). Least squares can be used to estimate the unknown regression coefficients in the model, expressed as:
\[ y_i = \beta_0 + \beta_1 b_1 (x_i) + ....... + \beta_k b_k (x_i) + \epsilon_i \]
For polynomial regression, the basis functions are \(b_j(x)=x_{ji}\). For piecewise constant functions the basis functions are \(b_j(x_i) = I(c_j ≤ x_i < c_{j+1})\).
The simplest spline is a piecewise polynomial function which involves fitting separate low-degree polynomials over different regions of \(X\). The points in the range where the coefficients change are called knots. Piecewise functions often run into the problem that they aren’t continuous at the knots. To remedy this, a constraint can be put in place that the fitted curve must be continuous.
Def: A degree-\(d\) spline is a degree-\(d\) polynomial with continuity in derivatives up to degree \(d-1\) at each knot. Each constraint imposed on the piecewise degree-d polynomial effectively reclaims one degree of freedom by reducing complexity. In general, a degree-d spline with \(K\) knots uses a total of \(K+d+1\) degrees of freedom.
A cubic spline with \(K\) knots can be modeled as \[y_i=β_0+β_1 b_1 (x_i)+β_2 b_2 (x_i)+......+ β_{K+3} b_{K+3} (x_i)+ϵ_i\]
With an appropriate choice of basis function \(b_i (x_i)\). The most direct way to represent a cubic spline is to start off with a basis for a cubic polynomial - \(x,x^2,x^3\) – and then add one truncated power basis per knot. A truncated power basis is defined as
\[h(x, \xi)= (x -\xi)^3_+ = \begin{cases} (x -\xi)^3,& \text{if } x\geq \xi\\ 0, & \text{otherwise} \end{cases}\]
where \(ξ\) is the knot. It can be shown that adding the term \(β_4 h(x,ξ)\) for a cubic polynomial will lead to discontinuity in only the third derivative at \(ξ\).
Splines can suffer from high variance at the outer range of the predictors. To combat this, a natural spline can be used. A natural spline is a regression spline with additional boundary constraints that force the function to be linear in the boundary region.
There are a variety of methods for choosing the number and location of the knots. Because the regression spline is most flexible in regions that contain a lot of knots, one option is to place more knots where the function might vary the most and fewer knots where the function might be more stable. Another common practice is to place the knots in a uniform fashion. Cross validation is a useful mechanism for determining the appropriate number of knots and/or degrees of freedom.
Smoothing splines take a substantially different approach to producing a spline. To fit a smooth curve to a data set, it would be ideal to find a function \(g(X)\) that fits the data well with a small residual sum of squares. One way to achieve this is to find a function \(g(X)\) that minimizes \[ \sum_{i=1}^{n} (y_i - g(x_i))^2 + \lambda \int g''(t)^2 dt \]
where \(\lambda\) is a non-negative tuning parameter. Like ridge regression and the lasso, smoothing splines utilize a loss and penalty strategy. The term \(\lambda \int g''(t)^2 dt\) is a loss function that encourages g to be smooth and less variable. Unlike regression splines, we do not need to select the number of knots – there will be a knot at each observation. Instead we choose the value of \(\lambda\) (one possible way is cross validation). As \(\lambda\) increases from 0 to \(\infty\), the effective degrees of freedom decrease from \(n\) to 2.
This method involves fitting a linear regression at a target point \(x_0\) based on “nearby” training observations, where nearby is specified somewhat similar to KNN and where the closest observations are given more weight than those further away. This procedure is done for every point along the \(X\) variable so that a curve for the entire range of \(X\) can be fit. The algorithm works as follows for \(X = x_0\):
The choice of \(s\) is very important and can be done using cross validation to determine what value is most appropriate.
Often weights are determined by using the normal distribution
An important choice here is what type of regression to use, linear, constant, or quadratic, while the most common choice is a linear regression.
This generalizes to multivariable settings with higher dimensional neighbourhoods.
This is the general multivariate method for predicting a response \(Y\) based on \(p\) predictors \(X_1, ... , X_p\), which means that it allows for non-linear functions of each of the covariates. The general multiple linear regression model
\[ y_{i}=\beta_{0}+\beta_{1} x_{i 1}+\beta_{2} x_{i 2}+\cdots+\beta_{p} x_{i p}+\epsilon_{i} \]
can now be thought of as
\[ \begin{aligned} y_{i} &=\beta_{0}+\sum_{j=1}^{p} f_{j}\left(x_{i j}\right)+\epsilon_{i} \\ &=\beta_{0}+f_{1}\left(x_{i 1}\right)+f_{2}\left(x_{i 2}\right)+\cdots+f_{p}\left(x_{i p}\right)+\epsilon_{i} \end{aligned} \] where each separate predictor is its own function. Then the effect of each function is added into the model which is why these are called additive models, because each individual covariates specific effects are added to the predictive capacity of the model.
These models give us the ability to fit non linear functions \(f_j\) to each covariate \(X_j\) so as to best model non-linear relationships (which are most often the case) and make more accurate predictions. At the same time, we are able to examine the effect of \(X_j\) on \(Y\) individually because the word is done in an additive way, so they are also an effective tool for inference and not just prediction.
GAMs can also be used in a classification setting where the \(Y\) variable is replaced with the log odds:
\[ \log \left(\frac{p(X)}{1-p(X)}\right)=\beta_{0}+f_{1}\left(X_{1}\right)+f_{2}\left(X_{2}\right)+\cdots+f_{p}\left(X_{p}\right) \]
The dataset used here is a dataset surrounding wages, which also measures a number of other attributes of the people covered in the dataset.
agelims <- range(age)
age.grid = seq(from = agelims[1], to = agelims[2])
fit=lm(wage~bs(age,knots=c(25,40,60)),data=Wage)
pred=predict(fit,newdata=list(age=age.grid),se=T)
{plot(age,wage,col="gray")
lines(age.grid,pred$fit,lwd=2)
lines(age.grid,pred$fit+2*pred$se ,lty="dashed")
lines(age.grid,pred$fit-2*pred$se ,lty="dashed")}
fit2=lm(wage~ns(age,df=4),data=Wage)
pred2=predict(fit2,newdata=list(age=age.grid),se=T)
{plot(age,wage,col="gray")
lines(age.grid, pred2$fit,col="red",lwd=2)}
{plot(age,wage,xlim=agelims ,cex=.5,col="darkgrey")
title (" Smoothing Spline ")
fit=smooth.spline(age,wage,df=16)
fit2=smooth.spline(age,wage,cv=TRUE)
fit2$df
lines(fit,col="red",lwd=2)
lines(fit2,col="blue",lwd=2)
legend("topright",legend=c("16 DF","6.8 DF"),
col=c("red","blue"),lty=1,lwd=2,cex=.8)}
## Warning in smooth.spline(age, wage, cv = TRUE): cross-validation with non-
## unique 'x' values seems doubtful
{plot(age,wage,xlim=agelims ,cex=.5,col="darkgrey")
title (" Local Regression ")
fit=loess(wage~age,span=.2,data=Wage)
fit2=loess(wage~age,span=.5,data=Wage)
lines(age.grid,predict(fit,data.frame(age=age.grid)), col="red",lwd=2)
lines(age.grid,predict(fit2,data.frame(age=age.grid)), col="blue",lwd=2)
legend("topright",legend=c("Span=0.2","Span=0.5"), col=c("red","blue"),lty=1,lwd=2,cex=.8)}
library(gam)
## Warning: package 'gam' was built under R version 3.4.4
## Loading required package: foreach
## Loaded gam 1.16
##
## Attaching package: 'gam'
## The following objects are masked from 'package:mgcv':
##
## gam, gam.control, gam.fit, s
# first a basic linear regression model
gam1=lm(wage~ns(year ,4)+ns(age ,5)+education ,data=Wage)
# the s() function indicates we want to use a smoothing spline
gam.m3=gam(wage~s(year ,4)+s(age ,5)+education ,data=Wage)
par(mfrow=c(1,3))
plot(gam.m3, se=TRUE,col="blue")
summary(gam.m3)
##
## Call: gam(formula = wage ~ s(year, 4) + s(age, 5) + education, data = Wage)
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -119.43 -19.70 -3.33 14.17 213.48
##
## (Dispersion Parameter for gaussian family taken to be 1235.69)
##
## Null Deviance: 5222086 on 2999 degrees of freedom
## Residual Deviance: 3689770 on 2986 degrees of freedom
## AIC: 29887.75
##
## Number of Local Scoring Iterations: 2
##
## Anova for Parametric Effects
## Df Sum Sq Mean Sq F value Pr(>F)
## s(year, 4) 1 27162 27162 21.981 2.877e-06 ***
## s(age, 5) 1 195338 195338 158.081 < 2.2e-16 ***
## education 4 1069726 267432 216.423 < 2.2e-16 ***
## Residuals 2986 3689770 1236
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Anova for Nonparametric Effects
## Npar Df Npar F Pr(F)
## (Intercept)
## s(year, 4) 3 1.086 0.3537
## s(age, 5) 4 32.380 <2e-16 ***
## education
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
We can use this model to make predictions:
preds=predict(gam.m3,newdata=Wage)
preds
## 231655 86582 161300 155159 11443 376662 450601
## 51.79577 99.62922 111.72718 126.59987 101.68718 130.56699 119.43829
## 377954 228963 81404 302778 305706 8690 153561
## 101.53374 117.64233 99.53635 117.57564 96.35856 96.17981 124.79942
## 449654 447660 160191 230312 301585 153682 158226
## 104.73248 117.62552 122.59272 155.73752 130.08713 107.81401 123.81907
## 11141 448410 305116 233002 8684 229379 86064
## 102.18862 116.54749 131.39338 102.88803 153.60520 105.66883 92.69174
## 378472 157244 82694 7690 377879 9747 233301
## 103.03776 56.37863 150.85320 113.94209 146.44565 94.42590 127.49270
## 157123 230823 80406 228851 153810 81383 303642
## 148.59166 121.11140 101.89627 105.58852 65.87799 108.33441 109.92247
## 87492 8692 86929 380872 449480 305136 227963
## 90.58550 90.76326 99.70897 155.14144 127.13534 154.34967 67.85966
## 232863 8621 379668 84595 154634 450864 84377
## 94.99997 152.41701 104.98924 128.78152 80.36994 142.10303 67.74908
## 234086 154482 85916 161065 12003 228071 13479
## 154.49241 106.15276 97.96093 90.51010 130.51567 115.96769 92.56873
## 81494 159076 159207 447501 153767 81071 376442
## 113.48292 150.01317 110.55769 106.75403 122.59272 99.22811 69.42504
## 87299 228621 232494 228400 451860 157058 159583
## 98.92260 91.16834 78.78358 105.58852 94.94814 150.97076 123.48192
## 233759 159224 374859 11710 86298 453021 161431
## 63.29369 94.55189 94.58339 154.26022 110.45431 156.27079 59.25156
## 305888 232199 86568 447500 452506 450908 82573
## 105.00325 78.78358 92.69174 93.90619 132.10221 146.72257 128.17307
## 159196 156110 14148 232000 453486 156065 229079
## 99.01693 77.73500 146.05099 71.90849 90.43217 110.76620 132.84695
## 450905 10660 449456 374660 87463 9273 377517
## 134.19911 119.84682 130.09757 128.75437 99.31489 106.91928 131.20511
## 231592 303825 156310 303376 230586 450109 379991
## 117.85138 93.73243 107.04527 114.88882 111.09845 115.77180 87.15318
## 87291 228517 160971 307464 449246 233043 377184
## 97.50227 103.86838 99.15479 103.38137 156.27079 155.49905 154.33370
## 8033 233687 447751 230398 378429 447412 13924
## 101.98011 105.49585 96.00309 130.16013 102.68791 116.96874 76.35832
## 87630 84600 451987 160246 307755 375007 303430
## 127.51805 90.06562 104.14621 147.40437 103.91277 155.14144 156.80132
## 379330 8339 83190 452580 302701 83222 159871
## 129.64356 154.55783 65.44504 130.65062 144.22763 98.92260 92.26401
## 82108 229714 159048 302868 10499 84127 11661
## 76.83789 93.09514 95.32063 71.41589 101.44871 153.15240 147.80490
## 86282 305327 81655 303953 374752 159109 159285
## 98.39147 131.39338 83.52173 149.73756 104.88097 126.59987 77.73500
## 159909 378138 9786 86191 154759 12122 306309
## 147.83491 154.33370 101.14668 111.72149 96.87612 124.95264 105.17623
## 377137 375944 304068 156557 306779 161021 85966
## 110.91903 103.29489 105.08226 124.01305 131.50864 88.09301 101.19858
## 453692 233313 9681 379875 305250 84642 451306
## 93.72178 116.36735 114.47350 109.16512 115.57272 112.94785 117.86399
## 228212 157989 88028 155697 234523 233149 13626
## 90.73776 110.02070 126.80845 97.77137 132.00124 105.06039 107.98981
## 234640 453255 154195 232628 85539 377464 230582
## 103.86838 106.94490 107.81401 103.69576 89.33128 155.31405 78.78358
## 9573 84164 11880 85545 153581 232176 450900
## 116.01518 111.41599 114.06661 68.05964 98.27282 155.01261 151.48833
## 377900 232371 12056 84397 233497 228458 230993
## 104.54973 114.51362 88.85171 112.94785 72.21905 105.68673 116.89875
## 153269 305585 302536 307024 233435 12288 303912
## 78.06082 117.57564 107.00076 152.02544 131.67747 153.06821 67.36706
## 14404 233441 377452 449474 381113 156406 378714
## 136.44136 101.66168 150.05074 106.61617 130.17470 149.15241 132.24163
## 376309 451901 450725 375024 159821 229865 83880
## 114.33421 130.19196 102.82547 82.96355 95.32063 130.57972 108.55458
## 9965 157250 453371 228243 307645 156420 160039
## 71.79236 111.51032 94.74887 94.74491 99.72801 109.62663 95.22623
## 233379 231082 301920 80687 450566 86450 234600
## 104.61388 116.06532 155.86163 97.33030 98.10933 128.78152 103.38752
## 307663 303900 453852 230477 227901 86826 8653
## 102.37472 102.05828 105.66355 118.06824 91.16834 119.96384 130.19714
## 305209 81173 451854 228591 302140 153731 228955
## 71.41589 100.45447 118.90051 112.71399 91.47151 98.38808 117.55377
## 9621 305165 378023 82989 82023 374706 379611
## 91.71121 125.38457 104.22595 112.94785 116.20783 130.30986 130.40031
## 452592 305871 157388 448936 377039 82375 449852
## 80.67305 86.74893 149.68940 90.47794 87.06211 108.55458 156.75164
## 301195 228628 85756 160269 301711 304988 156809
## 131.50864 132.84695 127.22512 126.42689 115.08280 104.23654 125.66018
## 14133 306552 377157 82901 159765 229546 9730
## 115.64298 117.14973 82.96355 101.52732 114.02618 94.43407 101.27051
## 158570 83618 379620 449489 447879 10076 84867
## 78.06082 99.41252 148.29683 104.14621 95.83011 88.85171 95.57550
## 14063 12822 302239 84949 11129 450963 154245
## 134.42156 130.20483 154.52001 99.14821 102.72369 155.00361 98.71933
## 231844 87485 306574 154477 13319 452710 156407
## 116.18915 78.98356 107.00076 96.74096 107.98981 104.95394 150.85888
## 153297 13996 80386 12586 234325 305437 231481
## 65.56743 88.85171 74.62417 91.79977 130.74640 73.72501 151.84570
## 83198 231026 303072 305362 447780 87269 307318
## 99.50231 103.69576 104.86539 105.08226 105.87206 118.11266 132.27535
## 302976 302515 14041 228348 381272 87402 451721
## 131.92845 78.29098 74.09128 89.00992 103.69455 100.98954 134.02613
## 8318 447992 377619 153764 158574 374992 155488
## 114.06661 93.72178 74.03820 123.48192 149.89791 104.96953 76.01205
## 8969 86280 451302 448525 381232 304500 156397
## 101.14668 100.45447 112.35663 93.72178 76.33712 130.64788 134.50380
## 9066 82172 375305 13745 87094 87118 11498
## 93.70135 99.31489 110.23565 94.42590 151.03761 152.19482 100.44207
## 87260 303688 304050 378178 302298 157594 10835
## 97.55374 156.70735 130.64788 132.66754 156.80132 134.50380 128.06402
## 81344 449687 7980 449444 10723 154638 85115
## 126.68462 134.02613 71.79236 104.34019 92.31966 140.28400 126.42031
## 232201 452906 301654 307056 161096 87060 12303
## 128.93378 158.03221 107.00076 155.24492 150.95286 126.68462 111.72981
## 229331 159410 154322 378567 450843 85580 303657
## 79.79771 87.14963 108.17256 130.30986 118.81195 150.93998 91.47151
## 231767 82755 84630 154919 83800 375159 452406
## 86.71100 87.00893 128.78152 140.28400 100.56973 94.82056 132.22604
## 375122 87199 82912 379794 307692 7744 85617
## 101.53374 101.52732 98.72862 103.69455 117.06117 110.06857 112.02974
## 82419 158170 10787 86679 379950 380366 377229
## 59.13428 81.95677 107.98981 79.91664 104.22595 95.45694 104.54973
## 14381 380704 154336 303935 449322 447585 154099
## 112.95616 115.39598 149.89791 104.86539 117.32350 131.66685 111.64818
## 83458 228692 10081 86122 452287 82373 448894
## 100.45447 98.60506 101.68718 105.18513 105.98732 151.87105 133.67922
## 81495 155436 231274 158044 153953 450724 160958
## 124.77437 109.23434 85.22172 88.65891 110.26476 104.14621 98.38808
## 376843 229069 9667 450052 448988 82603 7878
## 101.53374 156.03046 130.53357 105.37061 131.61229 128.68754 115.75485
## 14321 8396 447417 87860 232031 378256 155519
## 123.45191 100.44207 106.83303 126.98665 114.61372 105.39544 117.78219
## 304018 9841 448723 233955 8039 448678 306092
## 121.77947 103.14960 156.99570 104.11243 113.93651 109.52758 103.91277
## 153618 157194 306995 304167 12086 12979 451080
## 60.96327 112.09938 103.91277 102.81503 126.96718 100.88237 132.40424
## 85699 81085 228178 12945 450263 301266 157405
## 90.41252 128.68754 140.84486 129.57598 147.88324 116.11322 136.45237
## 161083 8459 451331 305396 451170 306067 303214
## 125.66018 147.80490 118.81195 132.35435 104.95394 104.86539 131.83989
## 452388 302942 11666 378911 82114 7969 379907
## 105.66355 88.80409 128.72081 105.17858 124.77437 84.28574 132.76151
## 232187 379987 448271 378868 11319 155212 160678
## 124.12325 102.90260 134.21700 129.21302 91.26470 107.81401 88.65891
## 86604 227990 8348 156680 158692 231182 306711
## 111.22200 105.14895 86.79451 86.60899 110.02070 115.80101 105.19413
## 12734 229031 449980 160714 302861 230508 12537
## 153.07380 98.60506 84.40115 111.21271 115.87475 105.14895 87.54377
## 450603 86119 448869 451086 154643 304493 303813
## 103.37852 101.19858 108.75153 88.93932 130.50576 116.11322 156.28144
## 376113 86394 301315 232504 10753 157040 305092
## 101.31030 113.90883 152.02544 115.36071 114.06661 134.50380 105.08226
## 12728 447357 159513 161380 14457 158761 154582
## 103.07059 93.55143 109.84809 109.62663 99.28789 125.99143 109.04035
## 158274 378307 9863 155729 87848 305240 159441
## 111.21271 130.96106 101.68718 98.71933 101.41544 94.27021 97.35471
## 80586 83515 231410 81995 232366 229698 449667
## 128.60854 47.63636 130.57972 151.57811 155.73752 116.06532 155.77130
## 81457 83804 154652 159717 302069 13267 8550
## 68.05964 150.77330 149.39646 124.23867 92.69591 101.98011 115.56398
## 449709 157793 302529 157309 451256 159735 85268
## 156.99570 124.50298 84.72913 99.23380 77.77471 61.51860 126.00072
## 453542 158301 307764 231800 12439 7412 86091
## 133.59066 123.81907 107.00076 155.49347 101.27051 102.93274 101.33644
## 159115 10935 447841 234010 453198 376184 160130
## 95.77928 90.66988 106.75403 153.74543 84.40115 157.02053 124.01305
## 306716 304809 11522 306077 301911 155698 450165
## 105.56308 85.43464 115.75485 116.61466 130.65346 149.39646 128.63608
## 159956 380945 301907 159358 233565 301859 302193
## 109.62663 132.58853 90.67574 99.71462 105.58852 92.45745 76.60070
## 161261 451254 305400 233567 380078 80581 87755
## 78.88067 86.47990 144.22763 155.19702 112.53458 153.13451 126.98665
## 13685 83327 159834 84809 87700 305809 380902
## 123.45191 101.19858 123.81907 128.78152 99.70897 113.66247 154.31300
## 158812 306821 231279 12575 232850 379119 81696
## 115.93101 86.21840 114.15507 102.18862 91.27696 110.23565 152.52606
## 378745 304502 80930 9157 377201 160496 306557
## 130.78845 73.72501 118.11266 126.50853 96.67174 97.53290 116.61466
## 302928 7880 379439 155174 80508 81575 231191
## 103.61983 110.17393 92.37097 97.77137 116.20783 124.77437 54.08528
## 232830 85999 450673 447485 453584 8016 160160
## 93.09514 113.82982 94.74887 158.24126 53.05394 103.24357 107.71962
## 380311 11315 232256 80679 229791 450800 230173
## 105.50731 114.68201 105.66883 116.20783 104.72914 112.35663 114.61372
## 228889 7978 374363 380398 452862 228899 232593
## 94.13647 100.96227 85.04231 155.14144 136.02623 84.40187 67.30432
## 231255 306356 158824 380061 376529 304383 10445
## 105.49585 114.02102 112.09938 115.18129 151.66628 81.67862 103.16327
## 229647 377052 380800 450000 233715 304660 233026
## 91.27696 117.98280 105.50731 116.96874 131.67747 104.65635 130.16013
## 80647 87572 11809 233001 305553 379752 380738
## 87.99868 150.33300 153.06821 115.04426 102.81503 118.00070 106.15327
## 447577 87038 154076 374391 449807 307460 449365
## 111.67324 100.90098 111.30127 99.55549 95.83011 130.65346 106.31856
## 378727 156087 12157 301568 10832 160170 453712
## 104.54973 97.52732 71.79236 103.16913 100.44207 47.74422 158.37912
## 87395 305387 229944 380031 231476 154504 231749
## 94.44565 154.02052 118.06824 154.52769 93.49069 82.87871 155.09939
## 377308 8330 154617 87791 230102 157248 447647
## 102.70861 103.26147 124.62680 86.17938 150.84684 106.15276 93.90619
## 231197 379516 451555 158257 81725 305274 379947
## 116.06532 130.78845 84.40115 85.95220 116.20783 103.38137 105.48942
## 84795 83423 301999 305108 375810 153403 154768
## 112.44640 111.90591 92.05779 76.02394 104.43446 110.15081 126.50589
## 302561 153724 84494 83214 378589 307823 303202
## 130.16702 150.85888 128.79941 124.77437 94.04561 105.19413 103.20317
## 452445 159137 451436 232410 307670 159052 155165
## 131.91780 99.32777 136.02623 105.66883 104.86539 95.37209 88.40385
## 13246 158241 379243 9196 450568 7781 10997
## 114.79727 77.73500 99.55549 74.09128 117.44733 153.31226 74.09128
## 153426 80273 374547 85217 377128 158403 228131
## 111.64818 126.68462 155.85104 90.27466 116.92785 150.43298 132.42105
## 452170 154530 81780 378629 305370 301646 12249
## 113.97217 103.00348 84.85051 132.77941 121.77947 78.29098 102.18862
## 302635 8793 12032 13257 156095 232674 378952
## 104.23654 100.88237 103.63042 130.53357 89.29529 92.15810 130.78845
## 304280 376160 86736 305599 9903 13558 378086
## 153.68337 116.18235 126.98665 103.16913 103.14960 130.51567 132.66754
## 80963 376772 453319 231608 87803 154604 304641
## 112.94785 105.17858 156.75723 132.33249 151.16144 84.82728 131.39338
## 452853 85681 452452 8297 233667 377125 380656
## 109.52758 100.24596 116.63959 90.76326 113.38633 87.50173 87.06211
## 374314 306069 306727 379612 153785 157154 306904
## 94.82056 86.74893 128.34679 157.02053 86.04265 85.81704 155.00087
## 9761 86702 158105 379806 449268 83615 378890
## 114.47350 99.62922 95.77928 130.17470 118.81195 128.26163 81.57194
## 230899 9311 7750 302750 231066 157343 9952
## 117.55377 127.73487 116.01518 130.08713 132.95883 115.93101 125.06745
## 233281 86503 14172 14341 231725 377627 375298
## 118.44044 111.72149 129.57598 114.18056 132.76795 91.09755 103.20811
## 84172 154047 375008 86259 230737 378052 155909
## 132.68740 71.95479 132.45068 152.19482 117.98924 101.31030 147.83491
## 375457 155588 306550 82560 379734 376576 158927
## 85.74782 126.50589 97.22251 142.46565 102.90260 156.50606 82.66886
## 374739 83417 14351 159265 157150 451548 302614
## 130.40031 126.42031 99.06445 148.59166 126.50589 116.83358 140.35226
## 453033 84994 227948 380920 231461 160102 449353
## 158.24126 152.19482 104.11243 132.76151 90.73776 110.55769 119.69862
## 448411 306810 155681 10055 233682 157882 302173
## 104.73248 130.47526 87.49825 138.41960 105.68673 117.78219 102.39543
## 231216 9850 161403 377645 84260 155985 306353
## 74.29781 112.95616 97.52732 130.78845 119.96384 115.93101 132.35435
## 228023 156832 304488 305737 303148 302080 447857
## 103.08201 96.54697 127.67245 154.02052 103.16913 130.35144 70.86263
## 233741 85657 379124 157694 83479 450888 14252
## 130.16013 47.63636 97.53569 115.93101 101.42911 88.49970 71.87255
## 14421 301908 452061 304906 302424 159404 231750
## 154.69568 73.80521 153.10387 104.56779 154.70443 150.01317 151.84570
## 305745 376178 450343 160548 302678 302085 159635
## 115.38831 90.55835 124.65688 92.88069 128.44118 121.77947 58.66814
## 81174 82948 82251 379828 450063 9535 154111
## 127.22512 80.24246 112.94785 117.88882 153.10387 88.31251 70.17548
## 305404 85550 447980 14481 85819 450651 82222
## 86.84000 83.52173 123.53025 115.75485 113.06311 106.31856 113.48292
## 12508 377741 302139 153833 85624 230790 449764
## 128.23436 140.61966 121.77947 146.85132 99.14821 138.86661 93.64188
## 449202 13741 302523 81623 13718 10378 161366
## 157.94365 103.14960 132.46623 101.89627 115.64298 129.46072 96.96657
## 9215 157493 302363 11991 449684 11238 159751
## 113.37575 125.99143 103.37578 112.95616 105.98732 103.26147 150.77988
## 452407 233537 229847 9864 447299 231895 230128
## 104.64570 153.74543 103.86838 99.28789 105.66355 122.27207 80.24442
## 12999 160782 379257 161228 232829 234092 84421
## 96.17981 97.04646 100.04119 95.32063 94.99997 104.72914 113.39436
## 157953 86497 7737 13471 448820 85643 453480
## 108.70321 108.33441 95.28985 129.57598 140.12479 100.45447 145.97841
## 85241 156206 84713 155666 83567 449541 448368
## 90.84056 98.27282 113.82982 93.87955 88.78505 158.56999 106.92701
## 377037 231115 305375 303226 85015 228219 379558
## 94.58339 138.86661 116.40615 117.06117 152.82367 94.22503 103.51635
## 160043 82149 156798 9029 157633 9820 448635
## 99.32777 150.35371 111.64818 128.15447 97.52732 97.30965 147.88324
## 81776 86230 84040 11619 87714 14549 83620
## 90.84056 100.98954 90.60340 154.77469 98.92260 97.30965 101.33644
## 378744 10047 11784 12453 378962 230457 447527
## 95.94719 154.26022 114.06661 90.51920 132.58853 116.89875 101.47878
## 154701 453719 153784 160819 380247 81823 155141
## 99.34567 104.73248 99.15479 124.79942 89.04035 90.84056 78.88067
## 156716 7546 374359 301939 306511 452755 8667
## 96.54697 99.28789 130.22925 103.20317 80.50471 132.00458 126.41413
## 450499 156050 160046 87749 8363 234293 448089
## 156.10044 114.02618 96.20982 127.72657 101.98011 130.74640 157.61241
## 453187 447835 307486 82464 155315 380158 375387
## 88.93932 106.61617 105.00325 126.19470 110.15081 82.96355 92.28419
## 85776 229893 229973 13960 234361 301929 306789
## 99.95302 103.38752 117.10726 90.66988 83.14297 116.40615 130.89193
## 230376 380304 306501 376743 230371 304137 374823
## 93.18851 157.13240 154.34967 142.95289 63.29369 142.30083 100.04119
## 451590 227916 7993 159388 304858 230749 86325
## 114.64451 93.80522 130.20483 124.31856 156.81922 118.18011 78.01181
## 154901 81954 451332 379839 449978 233080 307530
## 85.28590 152.96153 157.61241 89.11727 92.42652 103.47431 99.24231
## 161327 158949 448811 11623 10265 379315 230661
## 111.51032 92.26401 94.44669 88.85171 105.06810 96.67174 103.87396
## 81295 305243 228627 13060 375312 156535 304223
## 90.84056 114.86811 90.64337 82.79647 116.92785 148.97979 86.74893
## 307620 85969 13360 11113 305667 234017 12837
## 85.43464 74.62417 123.10336 103.24357 105.08226 150.23015 103.24357
## 302321 81373 160726 452148 229256 306650 452276
## 131.18487 87.46755 99.01693 104.64570 105.58852 103.07934 131.74745
## 302510 81228 228440 228053 10471 231759 155837
## 155.00645 150.33300 118.06824 103.30763 86.79451 69.60445 123.48192
## 302024 301193 158905 453630 303454 228501 304450
## 102.05828 93.31262 124.79942 106.84670 155.00645 132.33249 105.19413
## 378489 86991 153315 231642 234448 80744 374333
## 105.17858 108.33441 97.44758 101.66168 91.16834 87.34780 116.42640
## 304748 232443 451096 82862 380709 376073 301216
## 112.22139 83.14297 96.89453 128.26163 79.61829 104.22595 78.29098
## 233939 451070 449595 158200 9638 157436 452319
## 94.22503 104.83011 134.10513 75.83016 115.12852 74.65625 104.91990
## 302474 230090 306734 234336 8827 8301 85748
## 144.22763 155.73752 104.86539 156.68548 113.45565 129.25221 74.62417
## 376569 378593 158180 82969 228806 380329 304795
## 102.37147 101.38788 94.55189 138.63402 114.51362 103.69455 84.72913
## 14455 304663 87070 380220 12400 303868 7845
## 110.28873 97.22251 126.00072 110.91903 115.42612 113.66247 115.21707
## 234319 233042 233381 157856 82387 301852 82525
## 115.36071 116.36735 80.99730 103.00348 88.93573 86.21840 99.95302
## 449130 84343 452636 233211 233851 12233 12501
## 69.11784 101.50942 113.97217 104.11243 96.85115 94.42590 152.58735
## 153789 87826 8875 229950 85730 377504 13650
## 97.52732 89.53055 103.16327 100.89295 98.72862 97.04058 101.44312
## 155246 227999 157775 453565 8927 380898 85375
## 84.82728 117.64233 87.79541 103.37852 151.32017 69.42504 95.02118
## 153469 83341 8279 307337 13148 84841 85515
## 124.50298 128.17307 110.28873 99.72801 103.07059 111.80828 91.47694
## 86629 231027 157246 13588 376203 83057 230814
## 96.06119 98.60506 96.20982 103.07059 156.59462 106.93904 148.47624
## 305515 307267 88046 302698 232536 158406 452654
## 71.41589 104.56779 98.70791 99.24231 82.17122 125.33641 102.97133
## 155330 307313 159448 155833 307280 7401 11845
## 88.65891 103.38137 95.32063 111.51032 152.02544 102.72369 102.18862
## 307683 8589 375802 305144 453214 8360 377324
## 156.49048 103.14960 131.82182 97.22251 100.47993 101.68718 103.39252
## 302793 154537 232060 83048 376922 87672 234303
## 104.23654 95.37209 101.66168 126.98665 154.83320 94.44565 94.99997
## 374328 158629 231349 377297 230086 81256 306063
## 132.24163 142.13518 94.99997 93.30203 153.19238 76.08501 94.25231
## 378700 86261 450507 159849 301682 448787 82646
## 132.76151 114.00280 133.25942 98.38808 130.89193 115.77180 112.02974
## 81754 14268 85704 233733 229393 83536 375861
## 101.19858 102.18862 101.50942 103.47431 154.51312 101.42911 112.31441
## 14368 85295 231204 13498 302692 307635 83924
## 144.19981 153.15240 105.14895 77.81917 131.50864 130.89193 128.17307
## 80239 379220 453870 85521 9738 157529 307581
## 87.00893 104.43446 117.22587 72.35712 94.42590 120.15279 84.72913
## 380007 453715 381016 8356 156461 380325 156598
## 89.04035 119.32642 125.69775 154.55783 98.71933 92.49586 110.02070
## 450872 305335 449727 452029 232822 158958 233370
## 95.48321 94.50738 139.75425 68.56250 148.47624 101.92834 131.14606
## 161344 233394 233584 448801 302882 306349 452162
## 61.51860 114.06068 128.93378 115.41325 105.09593 115.38831 90.55486
## 231483 82643 305066 11473 86233 12787 233174
## 103.86838 128.47068 131.50864 121.69800 112.20235 153.31226 115.96769
## 303344 307057 301337 81731 157918 160058 159843
## 129.33038 155.86163 131.83989 63.14491 96.20982 122.59272 126.28903
## 157233 231489 452313 233665 157818 376459 13375
## 109.62663 131.14606 94.35332 125.87716 99.01693 91.78470 99.14204
## 154265 156078 303231 159873 228330 451634 159186
## 98.71933 130.50576 128.89984 101.92834 104.40537 86.47990 95.77928
## 160564 447672 452613 12504 302206 234624 159256
## 126.42689 144.05161 105.37061 92.33755 104.86539 103.47431 98.27282
## 14460 233287 452861 88065 7550 302313 82600
## 100.46277 157.29392 106.92701 97.55374 152.28185 129.33038 153.04053
## 380306 13488 153493 227880 378323 81976 155452
## 132.15307 91.71121 109.01965 112.71399 155.31405 89.53055 99.15479
## 450962 11853 156191 87661 82514 378030 157381
## 140.12479 127.73487 109.23434 58.56028 121.71775 140.66544 110.88147
## 86485 10930 307771 85202 233889 7496 453337
## 106.25566 114.68201 147.98365 99.31489 67.30432 101.68718 158.37912
## 376076 160307 161341 11390 301389 304303 87441
## 117.88882 109.01965 88.42175 122.06684 107.77681 155.74637 101.33644
## 12175 12033 82301 83227 153765 158059 375572
## 69.48323 115.73696 92.69174 101.52732 109.72426 148.75834 130.48021
## 448806 82280 153375 380151 230950 14546 450602
## 142.10303 152.19482 98.38808 140.66544 115.38141 88.85171 104.12550
## 81692 158659 306889 379968 10750 155530 86633
## 150.35371 125.54492 151.35310 129.64356 129.46072 91.37405 144.31683
## 378686 10144 87286 87895 375523 451283 14519
## 130.96106 78.57205 81.06231 106.25566 96.67174 104.14621 128.72081
## 380780 86239 10984 231862 449495 448715 448977
## 115.39598 128.60854 103.16327 110.41507 132.40424 105.37061 107.31386
## 234530 86190 230114 447347 155626 376579 451819
## 102.55088 109.90126 116.06532 132.39865 80.36994 156.50606 121.62542
## 155900 8505 234613 11832 11081 301246 375987
## 124.14821 114.68201 115.71056 140.36818 95.28985 102.58942 104.88097
## 156259 85655 448836 153902 305415 9743 230054
## 126.07999 99.41252 111.67324 47.74422 131.83989 103.26147 93.09514
## 12519 227962 83739 157490 82456 159012 88116
## 71.79236 91.16834 113.82982 149.39646 126.80845 60.96327 90.84056
## 376549 87170 11435 85129 448698 154709 379618
## 108.08999 152.07956 84.81627 121.71775 125.38143 122.59272 128.75437
## 161267 380753 153467 231484 379211 156236 450978
## 78.06082 103.68896 111.64818 132.95883 94.47152 150.77988 117.44733
## 84773 449829 305946 12507 154311 154975 307420
## 91.47694 119.10955 114.86811 101.27051 47.74422 121.03684 154.02052
## 228741 376605 304583 159573 375743 449387 83565
## 105.57485 115.88590 84.72913 86.60340 155.14144 95.48321 90.60340
## 7664 157200 230665 12813 302409 83416 83964
## 102.30388 98.71933 91.16834 95.28985 132.35435 126.42031 100.90098
## 13483 232794 447864 452049 87163 157204 80604
## 102.72369 104.40537 86.47990 78.76076 113.06311 125.99143 126.32986
## 161272 87121 231993 377133 449641 156429 12311
## 97.52732 101.41544 92.77184 103.69455 158.24126 126.50589 102.18862
## 379397 84236 451645 8988 307325 11919 11403
## 131.82182 113.39436 106.83303 114.47350 115.21796 83.30857 129.57598
## 88019 306940 155528 301789 378048 8841 85602
## 150.77330 130.64788 99.34567 116.40615 91.97868 115.42612 126.98107
## 304529 157296 155829 379034 153627 229223 380392
## 80.50471 108.27267 107.71962 132.15307 98.27282 87.68115 101.94092
## 158726 377495 230878 453110 85888 376196 228775
## 96.54697 62.54027 105.57485 96.89453 80.24246 76.13819 104.11243
## 153559 304567 83140 450085 378923 87254 9513
## 84.93591 125.38457 113.48292 131.41830 104.22595 96.06119 95.83126
## 156960 80462 304074 306048 448446 448106 86335
## 56.95263 132.68740 117.49664 66.81173 130.19196 104.34019 153.04053
## 230002 447211 305589 8755 13308 448287 10187
## 112.59919 106.83303 115.69655 130.34269 90.66988 94.94814 128.23436
## 80524 377969 153484 11876 229679 229435 80558
## 128.47068 92.28419 124.50298 119.84682 94.65094 103.47431 116.20783
## 11650 82081 82799 155256 80446 159200 8197
## 130.34269 146.07074 99.31489 109.04035 114.28103 111.30127 130.42170
## 153388 88113 155513 158884 230315 86782 306149
## 98.06431 112.44640 98.27282 80.90047 91.27696 88.93573 103.38137
## 380883 7639 381143 9181 158451 229117 233600
## 99.55549 103.16327 117.80982 100.44207 112.09938 99.73491 103.69576
## 231346 379646 228164 85693 452344 160400 160533
## 98.60506 74.11839 131.38453 100.24596 105.12656 101.92834 97.32067
## 307204 450078 84607 10989 155859 234391 81772
## 103.61983 154.45056 106.93904 81.97662 148.67155 113.38633 96.73354
## 377896 153951 231716 229399 302102 81714 155433
## 130.96106 67.95675 132.94093 92.15810 154.02052 112.73934 107.71962
## 87168 85320 7420 451424 229703 14417 9241
## 108.55458 126.58699 78.57205 158.24126 115.57540 81.97662 152.28185
## 377591 302226 376645 157321 154342 301885 84599
## 127.98563 85.80348 105.50731 124.80500 99.01693 94.25231 112.94785
## 374558 301209 378837 374851 153917 86617 374294
## 103.48231 156.28144 69.42504 116.18793 111.82116 105.18513 117.88882
## 375787 83031 155234 156931 84305 233131 451873
## 87.50173 90.84056 99.01693 85.62305 128.79941 104.11243 104.64570
## 452428 232403 158091 159901 374894 376018 85534
## 157.28863 156.68548 98.27282 63.26339 91.44755 92.20429 110.45431
## 378978 305552 12671 157620 156543 234246 157606
## 157.13240 156.80132 97.30965 123.81907 87.14963 85.22172 123.81907
## 230929 87063 157575 8274 229913 301692 304818
## 118.06824 99.70897 88.65891 92.33755 117.22252 105.08226 102.81503
## 448786 229605 231509 80950 87704 158664 81095
## 133.14415 81.75136 89.21977 128.68754 100.98954 110.76620 87.78399
## 302918 161349 306415 10603 86007 306146 234661
## 93.94148 96.54697 92.99809 101.14668 128.47068 117.49664 97.71511
## 84287 377509 377763 306688 302888 377799 381003
## 74.13644 123.94384 132.45068 83.90928 101.16909 95.45694 103.51635
## 380799 83368 11548 304155 9144 11624 153897
## 105.48942 99.53635 113.54243 104.56779 79.67258 130.34269 136.79124
## 157384 453498 229614 380993 159758 10899 374347
## 96.54697 104.83011 111.09845 102.37147 97.52732 103.14960 101.94092
## 374986 81794 303090 375451 154262 379725 88050
## 99.92639 88.78505 117.35878 91.09755 88.50543 116.18793 98.92260
## 451349 84848 306255 82384 378696 85794 450118
## 117.44733 153.04053 117.14973 101.33644 103.48231 100.24596 106.31856
## 9457 230105 153266 157526 234243 231448 449095
## 101.44312 130.84403 95.32063 124.62680 105.14895 131.14048 153.77621
## 303172 81506 80235 87943 83985 375234 156633
## 73.72501 97.40788 153.13451 83.08211 153.13451 123.94384 148.17206
## 14384 8450 160165 451015 232095 154723 304780
## 103.63042 97.68055 125.33641 133.88827 140.84486 101.15230 114.02102
## 377397 303182 11131 7535 375336 451744 232578
## 92.91572 102.98171 102.18862 101.36338 78.11643 132.93564 105.06039
## 374914 307821 305822 7495 449798 159599 448887
## 78.60417 117.68751 93.73243 128.32115 155.75059 72.44252 153.77621
## 453745 375738 229672 161522 378510 160189 230629
## 118.15693 110.91903 76.51654 91.91546 92.11384 125.99143 132.95883
## 233946 86943 230497 377005 80350 81917 301556
## 130.57972 92.69174 63.29369 116.31245 111.22200 90.58550 115.08280
## 8888 307676 7381 233790 303636 81716 158585
## 97.79535 104.23654 96.17981 71.90849 130.89193 87.99868 60.96327
## 307816 154833 450754 157064 377858 380391 452617
## 105.19413 125.04347 104.64570 97.52732 120.18782 131.20511 66.85079
## 452685 154958 161421 229694 7822 12679 447486
## 117.32350 92.26401 61.51860 103.78863 128.06402 92.31966 108.75153
## 13835 379762 81141 7699 85842 12364 84080
## 114.68201 130.96106 140.56082 129.57598 134.70720 123.45191 100.98954
## 451706 14152 85144 302797 81223 88062 452864
## 104.95394 101.68718 121.71775 95.14375 150.68285 113.06311 118.90051
## 12144 160944 8105 154672 453271 155921 154732
## 152.06715 124.31856 101.04905 142.13518 106.92701 126.59987 84.30231
## 233690 86143 156740 12718 449744 448117 154750
## 105.57485 127.72657 88.65891 154.77469 83.35601 93.80856 126.59987
## 83654 81277 379686 227939 80897 231662 154839
## 126.58699 83.52173 86.53158 102.12034 126.98665 118.16222 60.96327
## 305114 450873 447174 377920 161041 14541 376938
## 115.87475 100.47993 102.91986 76.33712 93.87955 115.64298 146.44565
## 447645 80720 447722 155179 8907 160862 155453
## 101.47878 88.93573 106.83303 97.53290 105.06810 111.21271 146.94571
## 378199 12156 447458 232327 301930 158517 12579
## 117.46292 71.79236 131.74745 153.74543 117.06117 108.17256 99.23643
## 13995 82195 306499 302319 447816 449074 229524
## 100.79192 151.33406 129.64682 117.94784 82.25548 105.13214 102.88803
## 232133 85388 13298 307289 7589 9082 305036
## 131.14606 99.95302 142.29497 129.66753 101.98011 114.68201 153.68337
## 302117 160497 450224 449975 80475 378718 13370
## 115.99927 126.07999 106.84670 109.52758 113.48292 103.39252 108.67319
## 380165 86118 159505 450919 80496 302736 81910
## 103.93302 128.78152 97.77137 66.26737 101.33644 103.07934 80.24246
## 159140 8846 7415 80565 452789 13535 156743
## 98.06431 92.57472 88.74309 90.58550 156.10044 153.81371 98.38808
## 87391 450392 155733 12600 80237 306346 81445
## 128.47068 131.61229 86.84745 112.95616 142.46565 115.69655 89.64581
## 231389 378598 306310 380028 86072 11321 307301
## 155.19702 113.97565 105.17623 115.78828 152.61462 128.06402 154.60680
## 447298 161253 377359 453728 14042 304908 160028
## 80.04176 81.34009 99.55549 101.47878 130.51567 131.92845 124.62680
## 13005 158124 86567 82851 305392 153650 304093
## 102.30388 97.53290 111.72149 149.12736 116.72993 88.23087 132.44833
## 233121 230850 157822 451294 14543 159847 83903
## 93.09514 122.27207 98.38808 81.05589 103.24357 96.74096 111.22200
## 378535 453171 301347 453420 155699 380739 9766
## 74.03820 104.73248 149.38901 157.94365 104.75739 103.68896 108.67319
## 234383 232723 81234 229581 87788 452608 8652
## 117.10726 105.14895 152.07956 104.11243 94.44565 119.42039 91.06543
## 451324 160285 84767 229001 230839 11453 87015
## 75.47579 147.40437 99.62922 110.74990 104.11243 69.48323 97.40788
## 157453 87789 10827 450748 83883 230302 160949
## 124.31856 128.26163 128.32115 115.77180 99.70897 119.94737 92.83953
## 302490 452615 156728 158466 8344 7436 374803
## 131.50864 112.35663 126.28903 86.60899 100.96227 97.79535 103.03776
## 12491 232762 230998 84524 13464 159550 234248
## 67.17920 154.17597 117.64233 126.42031 117.94198 86.75408 112.71399
## 234357 451267 155944 228029 159068 228443 376883
## 85.22172 155.43415 111.30127 115.88091 106.37293 117.85138 101.38788
## 233097 228418 80966 229478 374483 381181 12955
## 105.68673 127.49270 100.98954 99.18059 155.31964 92.11384 100.96227
## 161502 380218 156036 229899 305122 450849 376406
## 121.15165 157.11451 109.04035 95.63635 105.09593 96.02099 130.40031
## 303218 156645 14338 14140 380621 447629 86490
## 129.66753 82.95563 95.28985 101.44312 105.31644 94.20822 99.22811
## 302168 158551 233702 378925 160680 158298 450290
## 155.00087 88.23087 146.62506 74.03820 125.54492 110.76620 117.62552
## 305059 301937 160924 12963 10344 8757 82071
## 113.65049 154.34967 89.29529 78.57205 76.35832 93.21110 103.33395
## 155631 9139 10933 449746 379247 13497 14109
## 86.60899 96.75533 102.63513 110.60272 117.37436 101.23647 102.93274
## 234415 234376 155250 85134 381020 159971 9591
## 105.06039 131.67747 125.54492 88.79063 103.48231 96.74096 114.79727
## 83666 301931 307750 453302 307225 230293 154660
## 126.58699 154.44012 101.62774 145.97841 129.33038 117.98924 78.06082
## 156739 8789 375928 447995 447215 448598 229234
## 111.51032 90.22276 132.76151 94.35332 117.75004 156.99570 156.23897
## 447888 82715 82946 80449 86044 157202 450096
## 93.72178 128.60854 94.44565 118.11266 103.33395 96.54697 106.40712
## 448535 450450 451844 451460 11973 452739 230033
## 158.37912 131.61229 106.83303 106.31856 86.79451 125.38143 157.29392
## 377968 447810 9620 83273 381222 301976 381289
## 91.97868 119.43829 71.87255 113.69197 112.53458 101.16909 132.15307
## 307040 450227 302539 86544 86015 84882 301497
## 115.30841 116.63959 93.73243 109.90126 112.94785 153.15240 130.08713
## 378528 7539 14035 379720 87842 12496 453550
## 116.18793 115.21707 152.89560 95.45694 126.80845 101.44871 105.13214
## 12905 307423 302880 229722 13420 305048 81872
## 110.06857 103.91277 90.70382 103.86838 60.86844 154.70443 111.72149
## 11889 301313 448972 304644 380216 154881 85010
## 102.30388 130.89193 81.50260 103.07934 131.49805 125.33641 101.50942
## 303653 374554 7830 14307 83763 161310 450610
## 66.81173 105.17858 129.57598 62.58394 126.42031 111.83905 75.47579
## 8736 379881 161031 156574 380839 380501 449794
## 130.34269 144.54081 86.75408 99.32777 130.30986 93.31127 110.97156
## 81288 231420 10519 381177 229249 453598 82185
## 138.63402 116.89875 112.08837 117.46292 98.60506 105.12656 103.33395
## 453746 448132 86463 84715 155547 83136 8414
## 132.10221 134.19911 123.33329 150.35371 96.74096 128.68754 94.42590
## 304459 378108 155401 228504 376032 305001 10568
## 115.99927 69.42504 124.79942 97.71511 103.29489 88.51732 152.41701
## 158869 82571 233856 85706 87534 158028 376894
## 98.38808 99.50231 156.68548 128.79941 85.06036 126.07999 108.08999
## 450739 453840 85005 12029 233756 228877 233966
## 106.84670 105.12656 113.82982 101.36338 157.31182 116.49186 130.35411
## 376565 375596 7603 376986 448055 81116 228861
## 94.82056 103.12821 95.28985 156.59462 85.66005 109.99566 51.79577
## 87034 305311 378766 13578 302454 160354 452525
## 124.77437 132.44833 104.22595 125.06745 156.19288 124.62680 110.60272
## 83954 302858 11897 305534 448547 154312 13095
## 124.67998 94.27021 91.37997 103.38137 127.13534 99.15479 121.69800
## 155937 233677 82261 450761 11935 449193 13380
## 125.04347 131.38453 126.50021 104.56580 101.68718 134.21700 114.06661
## 13510 303955 82964 155032 81944 228060 228305
## 121.69800 103.61983 126.98665 109.72426 152.07956 96.85115 112.71399
## 8471 375955 378357 228453 375260 84747 9001
## 115.75485 103.29489 127.31329 153.19238 146.44565 101.52732 79.92785
## 13523 377490 85233 8658 302756 228793 85808
## 103.14960 130.17470 112.20794 112.61901 83.58346 97.71511 124.77437
## 229152 449705 85799 155865 85689 450894 378221
## 115.80101 155.75059 99.14821 79.58618 97.50227 128.75088 132.66754
## 230406 376602 156489 7568 453257 376581 379989
## 151.84570 86.53158 96.96657 105.06810 95.06340 85.04231 113.97565
## 234332 11046 303385 450697 156124 161043 449651
## 103.30763 81.97662 102.05828 117.75004 97.77137 148.17206 156.27079
## 233230 231523 154395 304408 380248 83466 13091
## 108.26940 116.36176 150.77988 119.45478 107.31394 100.24596 115.64298
## 84078 14266 82469 450648 230082 302568 452618
## 152.61462 89.51815 118.11266 95.39465 109.34454 86.21840 94.35332
## 449703 228508 453301 8172 380101 306319 10780
## 117.75004 103.47431 119.10955 128.54261 103.93302 102.72458 115.42612
## 8168 234147 379279 13027 159780 153749 87231
## 99.28789 105.58852 115.88590 129.57598 97.32067 97.77137 128.26163
## 381130 83569 82380 87411 80378 306390 233582
## 104.88097 97.50227 84.85051 88.48860 99.70897 117.06117 127.49270
## 230156 80860 157459 228496 453835 376688 84683
## 124.12325 113.90883 85.28590 94.74491 68.56250 110.23565 94.44565
## 380971 448578 376787 231118 7373 156889 80853
## 103.93302 104.56580 77.32317 125.87716 60.86844 99.23380 88.39098
## 379750 377519 11199 306981 232149 13294 229612
## 105.48942 156.94153 128.72081 131.18487 104.72914 128.95927 128.93378
## 12617 451199 7609 231686 234389 229901 153622
## 152.08786 131.61229 91.79977 131.14606 116.36735 94.76281 126.59987
## 86931 9860 82359 83774 379289 451529 157319
## 105.18513 130.51567 125.98001 97.96093 93.51054 118.15693 124.31856
## 10740 83212 234447 448296 229238 156703 303382
## 152.67414 100.98954 87.24152 99.51469 153.74543 90.51010 104.65635
## 83663 13264 228067 379994 374633 380994 452521
## 89.64581 105.84415 115.96769 105.50731 129.64356 103.03776 104.83011
## 301537 452259 380756 156099 379666 13066 233531
## 154.60680 130.19196 101.38788 110.76620 103.68896 100.96227 130.48927
## 159976 155361 301559 159911 378511 303173 155313
## 126.50589 126.07999 97.22251 148.36605 156.50606 153.68337 101.92834
## 231958 375616 307319 12456 448765 301777 11762
## 116.18915 103.48231 152.02544 103.07059 142.10303 115.69655 152.08786
## 379995 302475 303761 7976 157964 9336 379954
## 76.13819 132.27535 129.99667 115.42612 52.33948 106.91928 103.68896
## 230714 83126 82701 452203 154263 230644 304966
## 93.49069 90.41252 113.06311 104.73248 76.01205 101.66168 103.16913
## 156987 88084 160389 81881 83677 80890 306629
## 98.80789 124.77437 126.59987 126.58699 151.33406 101.41544 69.11186
## 12188 301793 447716 10043 156286 376933 160815
## 112.93545 114.02102 115.77180 81.65080 126.50589 155.01761 121.82399
## 84588 156257 306463 304367 156055 84965 86137
## 126.42031 63.26339 103.37578 115.99927 126.42689 112.94785 113.39436
## 7434 13145 376834 80861 307009 9407 448011
## 115.73696 115.56398 131.20511 99.70897 130.89193 151.75071 116.96874
## 301160 87472 86258 86622 234539 233141 160720
## 102.39543 100.24596 99.71455 103.33395 115.36071 105.14895 140.28400
## 380833 447332 13074 377769 159957 14047 229085
## 112.31441 118.15693 128.72081 127.31329 87.14963 96.75533 105.06039
## 156367 86170 231625 376206 374441 229681 84975
## 148.15135 128.26163 120.36724 94.47152 92.76504 100.10580 123.33329
## 80338 158704 86260 377704 450907 8898 86506
## 97.96093 79.58618 151.16144 94.82056 128.75088 94.42590 88.78505
## 81695 452011 233422 232655 161451 450319 305903
## 150.33300 132.93564 156.23897 104.40537 72.44252 131.39760 103.37578
## 12064 448531 450203 302905 377539 306049 234286
## 114.68201 132.40424 102.15112 92.15542 105.87626 103.07934 101.48971
## 82123 13073 12975 9152 85858 449352 156000
## 96.06119 62.58394 102.63513 154.86866 127.72657 155.77130 107.04527
## 374878 374341 453736 83544 374646 14363 380303
## 132.66754 92.91572 130.19196 97.50227 156.59462 130.42170 84.22246
## 11668 156595 303371 12558 154495 232910 448457
## 152.28185 99.34567 115.86916 102.18862 101.15230 150.23015 153.77621
## 156591 374845 154639 376657 453155 302655 234441
## 150.85888 90.98893 150.43298 149.70219 106.83303 117.06117 98.60506
## 10756 157788 159478 82408 231687 451735 14361
## 101.27051 122.49833 98.71933 112.94785 156.77404 105.98732 128.23436
## 447846 87736 159033 452456 229915 85977 158370
## 101.36398 110.35421 110.55769 121.62542 105.14895 111.41599 111.30127
## 306799 86857 154144 155861 302734 87460 301952
## 108.85194 128.78152 56.95263 149.89791 156.49048 121.71775 156.62834
## 452190 302487 375314 80513 8245 450802 380599
## 106.31856 105.08226 123.94384 99.05776 103.16327 104.64570 99.00117
## 8760 228870 86333 82672 303408 379215 153433
## 101.44871 80.99730 106.25566 119.96384 104.23654 74.03820 98.80789
## 452035 12738 10025 302428 230517 451939 83710
## 157.28863 154.26022 123.45191 103.61983 103.38752 96.25216 101.41544
## 11155 10801 377849 155762 380873 11350 449916
## 114.68201 129.90723 84.22246 99.15479 132.15307 102.30388 86.47990
## 11955 452076 158386 8307 452919 304571 84662
## 114.47350 105.13214 148.36605 103.16327 104.64570 103.91277 101.19858
## 157527 155753 85476 86888 11885 379300 84104
## 150.97076 84.93591 75.25546 58.56028 90.34659 85.04231 99.71455
## 451062 379529 155117 234168 228808 85191 159708
## 134.21700 118.00070 80.90047 132.00124 101.56729 152.07956 82.66886
## 155806 378375 155162 230689 158165 448727 154715
## 125.66018 154.91998 77.72901 104.72914 73.07382 102.97133 111.30127
## 449784 82382 159218 81077 303201 375099 452764
## 95.06340 124.00563 93.39385 112.94785 115.69655 103.29489 123.53025
## 84935 302956 231714 377432 450157 155744 12978
## 128.60854 90.67574 117.85138 132.77941 106.83303 98.27282 88.74309
## 228951 156037 302728 233642 228903 449895 451041
## 65.00920 99.32777 130.08713 115.88091 154.49241 94.73963 134.02613
## 376582 160144 379821 161269 87217 160293 86674
## 82.96355 90.51010 132.15307 143.88910 103.33395 92.26401 112.94785
## 87761 303104 229277 452824 232086 233767 12838
## 126.68462 131.83989 157.19994 125.38143 67.85966 130.57972 113.54243
## 159042 375741 85607 86744 11797 452631 374872
## 87.88397 156.80367 153.15240 128.79941 154.55783 131.41830 100.04119
## 448646 379131 231134 9431 379883 376403 376258
## 111.67324 94.82056 103.30763 101.27051 146.44565 120.18782 130.96106
## 14511 449447 231149 13208 376577 9330 380510
## 69.48323 132.10221 127.49270 88.31251 104.43446 101.44871 104.43446
## 234379 449359 449768 304596 83073 80331 307248
## 154.93272 105.37061 105.66355 81.67862 65.44504 127.84183 116.72993
## 87597 161439 234656 153663 11542 81869 156792
## 101.42911 95.37209 101.71315 77.73500 152.50746 113.69197 110.55769
## 376283 452245 231515 306859 82001 375236 86010
## 76.33712 118.48070 128.93378 115.57272 150.77330 109.16512 111.64160
## 230943 228764 156896 453724 379194 452457 232552
## 104.72914 105.06039 109.84809 118.36544 78.60417 127.13534 117.10726
## 450777 158588 377411 302723 153400 86089 160883
## 73.16667 110.26476 93.62581 155.74637 111.72718 112.33245 126.28903
## 379090 302129 86755 377441 87396 307386 84169
## 96.67174 81.67862 126.68462 105.40911 126.98107 130.65346 100.45447
## 449775 228357 449987 303856 304921 374988 229150
## 126.78679 131.88598 156.57903 112.22139 92.60254 105.39544 101.66168
## 84663 379349 157534 305469 231089 82956 379819
## 152.52606 104.22595 86.30696 97.76392 84.07605 98.92260 156.59462
## 449534 448935 375717 304731 10772 14158 85775
## 117.22587 82.25548 76.33712 128.34679 98.46769 105.84415 101.41544
## 161082 377328 155957 154985 87716 374629 232517
## 67.87655 118.26103 150.97076 88.40385 100.56973 131.82182 155.01261
## 84219 380749 453653 81828 377546 451614 160598
## 153.04053 131.82182 102.15112 99.05776 146.43966 119.69862 123.81907
## 7816 157421 9691 304770 81122 233881 377413
## 130.51567 58.66814 130.53357 117.94784 89.32204 99.73491 93.31127
## 303918 229437 447724 85017 9109 84346 301863
## 152.79418 89.21977 112.35663 100.45447 154.88656 95.06234 115.47509
## 452767 380912 450623 7899 13782 452871 13456
## 117.05919 131.82182 115.41325 86.79451 154.55783 102.91986 100.65676
## 306022 232102 375105 81175 375985 233063 85647
## 115.69655 118.06824 94.82056 112.20794 93.00910 105.49585 113.69197
## 11736 153843 10673 84898 375389 374477 160912
## 154.86866 111.21271 154.26022 128.79941 100.04119 103.68896 108.17256
## 13605 305951 84566 160765 449036 13295 7863
## 114.68201 79.30511 140.56082 106.37293 104.91990 110.06857 115.21707
## 87877 86166 160895 450033 156104 160718 81086
## 126.58699 101.33644 58.66814 116.61888 106.25813 97.32067 109.99566
## 87767 13125 231653 85304 375038 9595 87553
## 85.06036 101.36338 80.99730 128.79941 155.31405 153.92897 99.41252
## 81392 451374 158047 81515 153519 380550 304366
## 152.96153 158.56999 99.71462 101.19858 109.84809 107.31394 101.22055
## 304377 9064 378073 158940 380022 227841 12002
## 114.88882 84.81627 130.30986 125.04347 86.53158 117.85138 126.96718
## 304602 450489 158881 154684 9521 451147 448799
## 82.42279 104.12550 96.87612 72.44252 114.79727 156.57903 134.21700
## 86446 378317 7499 154659 159096 379777 161093
## 100.45447 132.76151 113.94209 88.40385 99.15479 85.04231 148.75834
## 8398 86001 9947 13597 8402 229336 9471
## 146.05099 127.22512 149.42044 125.06745 102.74340 142.79343 154.86866
## 307463 303301 307758 8704 450579 377548 379802
## 79.30511 62.80110 105.00325 154.34878 136.02623 99.55549 117.46292
## 155828 160072 158458 380862 229278 158416 374326
## 98.80789 78.06082 97.52732 131.20511 131.67747 111.64818 102.70861
## 84906 10154 304890 448330 302440 8594 160473
## 126.50021 102.63513 92.27925 131.83790 101.22055 100.88237 99.01693
## 452589 154916 453566 453173 231286 83337 8625
## 96.00309 104.75739 104.34019 96.25216 96.12660 112.02974 130.20483
## 304249 452699 13542 233331 12638 376869 11100
## 130.64788 126.78679 138.41960 101.71315 103.24357 155.85104 152.67414
## 379372 376009 304338 304116 452574 230268 159545
## 156.17481 113.97565 132.13749 103.07934 119.69862 75.21307 125.33641
## 229535 161425 376778 232700 306371 304010 154423
## 103.86838 98.27282 101.48227 76.51654 125.38457 82.65037 150.97076
## 377710 8072 306740 374463 155676 378483 11655
## 132.45068 114.68201 155.00087 94.39252 95.32063 115.39598 153.81371
## 159926 161488 380370 154590 86392 12146 301904
## 76.80191 97.32067 105.50731 96.54697 119.96384 102.72369 55.88781
## 375850 449254 378197 12275 447285 229216 379593
## 112.31441 131.91780 129.98071 92.57472 106.92701 131.38453 130.48021
## 10380 378289 453516 8978 87747 13594 448361
## 86.58466 132.24163 130.19196 115.56398 101.89627 154.77469 94.94814
## 82431 227968 154580 155201 228062 301131 81508
## 153.13451 116.60582 99.15479 96.54697 94.76281 77.00998 114.02070
## 160105 10455 230783 380368 8521 302231 154400
## 63.73233 101.04905 120.36724 131.49805 85.25589 85.43464 56.95263
## 376389 231469 155163 229213 161447 11017 81252
## 114.86485 155.09939 97.32067 132.33249 98.38808 129.57598 94.44565
## 227917 82223 450449 155027 301716 160957 307162
## 155.01261 146.07074 130.19196 76.80191 99.61320 97.35471 93.64387
## 153288 10549 448079 85787 232991 232011 234060
## 74.65625 91.79977 73.16667 95.20496 105.35799 116.36176 155.49347
## 83770 228316 451479 233965 8562 231536 451622
## 82.55159 116.89875 96.02099 67.30432 154.86866 132.76795 133.88827
## 451993 159704 228435 11386 10964 227859 449407
## 123.53025 146.85132 115.38141 130.51567 130.20483 62.71969 153.77621
## 233646 450142 375066 377927 154494 80376 81068
## 157.29392 134.21700 115.88590 91.97868 95.14865 127.22512 146.07074
## 233828 85640 10274 153933 10377 87797 84394
## 154.51312 96.06119 142.29497 148.59166 115.21707 100.45447 104.10999
## 232457 377675 304688 233833 374782 154678 303392
## 80.99730 132.15307 105.56308 115.57540 103.03776 71.95479 132.46623
## 453674 302464 230110 86348 449111 156748 8312
## 88.49970 130.65346 90.73776 144.68567 87.18541 149.39646 100.46277
## 378918 154871 302382 305523 377010 157367 154310
## 130.48021 89.29529 115.86916 115.47509 154.83320 110.55769 88.23087
## 8265 154479 14202 161025 85939 158022 229664
## 128.71522 86.75408 113.93651 149.39646 100.90098 110.76620 116.36735
## 448419 301493 9698 451173 377766 379628 158239
## 98.97329 115.57272 113.54243 132.40424 146.44565 130.48021 150.97076
## 450366 10192 303306 230907 87177 85563 378239
## 102.97133 153.81371 80.50471 131.67747 153.13451 114.00280 105.50731
## 232251 448807 451298 234574 303467 160372 80668
## 120.36724 149.73442 128.75088 92.95004 117.49664 147.83491 96.06119
## 230140 87724 159738 13820 159737 158555 8911
## 117.55377 110.88485 65.56743 102.72369 124.23867 99.34567 129.25221
## 230355 155813 304171 154382 447429 307480 301212
## 132.84695 84.93591 115.69655 134.50380 88.49970 100.99711 104.23654
## 450515 160071 231742 379911 231151 7548 157269
## 106.94490 122.49833 146.62506 103.69455 151.84570 71.79236 97.53290
## 378112 158610 87409 451122 227949 451359 13067
## 132.15307 90.51010 92.69174 158.55210 118.16222 133.14415 100.44207
## 374802 86228 379346 376228 228763 85100 87786
## 103.39252 88.93573 104.54973 153.10736 79.79771 88.93573 100.45447
## 87346 10641 451408 159969 376315 233368 155264
## 113.06311 130.51567 156.19089 148.67155 102.70861 103.69576 149.89791
## 7747 302426 157328 9454 160476 84722 160518
## 136.44136 132.35435 86.60340 128.95927 149.39646 150.68285 82.87871
## 12284 375528 83300 9974 11998 11771 85840
## 113.37575 157.11451 128.78152 107.28812 101.68718 114.47350 99.95302
## 83877 305966 7951 451372 83243 10311 159643
## 125.98001 115.87475 101.44312 117.22587 111.72149 115.64298 109.62663
## 378452 153846 13108 11905 375715 82621 12425
## 74.03820 110.10503 101.27051 76.35832 94.47152 109.99566 113.45565
## 82295 379133 305527 13255 86181 157316 450927
## 63.70025 125.34920 131.83989 125.06745 96.73354 126.61777 154.54495
## 229450 85047 447600 450428 85993 378229 449815
## 120.36724 114.00280 130.19196 82.25548 112.20235 157.02053 133.14415
## 229998 448218 306163 11664 8194 14196 88022
## 155.49905 104.95394 105.17623 128.54261 153.31226 128.32115 81.06231
## 160061 7840 450384 160299 233831 449264 12477
## 78.88067 105.84415 106.83303 90.51010 90.33879 92.42652 97.30965
## 375640 161055 82687 301552 375238 453137 379538
## 156.05955 148.17206 113.82982 103.61983 103.69455 105.87206 105.87626
## 451582 447462 158645 87154 378986 160715 81037
## 133.59066 96.89453 124.50298 82.13667 131.70656 126.61777 79.91664
## 82804 154694 452218 157720 374624 153643 86198
## 95.57550 138.37917 84.40115 98.27282 100.04119 98.38808 111.64160
## 84791 232289 374507 305083 87712 306948 13141
## 61.43321 155.19702 96.67174 114.12113 98.72862 130.16702 118.68615
## 155887 228654 304515 83807 229996 301419 306410
## 70.17548 60.98457 129.66753 95.57550 101.71315 154.02052 116.40615
## 452996 14126 158400 87273 231271 155621 11861
## 93.93345 90.66988 149.89791 88.93573 107.49336 98.27282 76.35832
## 154008 161216 447422 156545 13641 304636 452513
## 106.37293 99.01693 155.75059 149.68940 115.21707 156.62834 116.61888
## 81809 231777 9019 9487 304371 305970 155402
## 68.05964 89.21977 101.04905 140.36818 147.98365 104.56779 149.89791
## 307501 155886 229104 87711 374720 156049 159113
## 86.74893 85.81704 105.14895 99.14821 103.51635 109.72426 95.32063
## 449072 87306 229074 302202 303505 11180 9111
## 102.97133 94.44565 131.88598 102.98171 98.68799 150.86152 101.44312
## 447235 304337 159650 234513 159500 12446 9781
## 102.82547 117.06117 149.15799 105.06039 106.15276 96.79650 103.07059
## 305890 306575 153588 306484 377256 379428 450934
## 102.58942 105.09593 142.13518 103.91277 155.31405 132.77941 116.63959
## 377314 234185 448466 12792 80262 82810 301634
## 156.17481 105.06039 94.94814 69.79379 128.60854 85.06036 142.30083
## 306030 231565 451279 307401 453377 159201 84893
## 114.02102 155.19702 91.99594 116.72993 156.19089 111.83905 124.00563
## 161391 161397 161416 306010 306687 232349 83445
## 99.71462 112.09938 97.53290 78.29098 116.11322 96.85115 75.63830
## 303155 450065 231998 80918 304411 155790 159561
## 88.72717 118.36544 96.85115 99.05776 105.00325 95.37209 107.81401
## 377472 450455 304184 154351 447182 13962 154728
## 103.93302 94.74887 102.37472 93.39385 73.16667 101.04905 99.01693
## 380298 230171 307415 161305 451605 301838 154752
## 103.69455 111.09845 103.91277 97.23088 115.87190 93.19736 86.43079
## 8804 158531 379706 306214 158084 305029 307412
## 129.46072 86.04265 103.68896 88.72717 109.23434 146.13246 155.00645
## 377739 451296 157053 303357 233408 449482 376816
## 120.18782 105.37061 87.14963 87.18855 91.16834 119.69862 118.00070
## 302281 10033 14375 453557
## 88.72717 69.79379 93.21110 104.64570
The lo() function uses local regressions to make a fit, and can also create interactions before the gam() function is called.
gam.lo.i=gam(wage~lo(year,age,span=0.5)+education,data=Wage)
## Warning in lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame,
## bf.maxit, : liv too small. (Discovered by lowesd)
## Warning in lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame,
## bf.maxit, : lv too small. (Discovered by lowesd)
## Warning in lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame,
## bf.maxit, : liv too small. (Discovered by lowesd)
## Warning in lo.wam(x, z, wz, fit$smooth, which, fit$smooth.frame,
## bf.maxit, : lv too small. (Discovered by lowesd)
library(akima)
plot(gam.lo.i)
Using I() and family = binomial allows us to fit a logistical GAM
gam.lr=gam(I(wage>250)~year+s(age,df=5)+education, family=binomial,data=Wage)
par(mfrow=c(1,3))
plot(gam.lr,se=T,col="green")
We can see that there are no high earners in the education category with less than high school education, so we will take it out when fitting the model.
table(education ,I(wage >250))
##
## education FALSE TRUE
## 1. < HS Grad 268 0
## 2. HS Grad 966 5
## 3. Some College 643 7
## 4. College Grad 663 22
## 5. Advanced Degree 381 45
gam.lr.s=gam(I(wage>250)~year+s(age,df=5)+education,family=binomial,data=Wage,subset=(education!="1. < HS Grad"))
plot(gam.lr.s,se=T,col="green")