> # test.plotmo.R: regression tests for plotmo > # Many of these tests are culled from man page examples and modified to try to confuse plotmo. > # Many of the plots are plotted twice so you can visually check by comparing > # plots in the same window, they should be substantially the same. > # Stephen Milborrow, Petaluma Jan 2007 > > print(R.version.string) [1] "R version 3.0.2 (2013-09-25)" > print(citation("rpart.plot")) To cite package 'rpart.plot' in publications use: Stephen Milborrow (2012). rpart.plot: Plot rpart models. An enhanced version of plot.rpart.. R package version 1.4-3. http://CRAN.R-project.org/package=rpart.plot A BibTeX entry for LaTeX users is @Manual{, title = {rpart.plot: Plot rpart models. An enhanced version of plot.rpart.}, author = {Stephen Milborrow}, year = {2012}, note = {R package version 1.4-3}, url = {http://CRAN.R-project.org/package=rpart.plot}, } ATTENTION: This citation information has been auto-generated from the package DESCRIPTION file and may need manual editing, see 'help("citation")'. > > library(earth) Loading required package: plotmo Loading required package: plotrix > source("fast.postscript.R") > data(ozone1) > data(etitanic) > options(warn=1) # print warnings as they occur > if(!interactive()) + fast.postscript(paper="letter") Opening Rplots.ps > Trace <- 0 > dopar <- function(nrows, ncols, caption = "") + { + cat(" ", caption, "\n") + earth:::make.space.for.caption(caption) + par(mfrow=c(nrows, ncols)) + par(mar = c(3, 3, 1.7, 0.5)) + par(mgp = c(1.6, 0.6, 0)) + par(cex = 0.7) + } > caption <- "basic earth test of plotmo" > a <- earth(O3 ~ ., data=ozone1, degree=2) > plotmo(a, degree1=2, degree2=4, caption=caption, trace=TRUE) --get.plotmo.x for earth object get.data.for.formula: using x from "ozone1" passed to earth got x with colnames from object$call$formula x[330,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5710 4 28 40 2693 -25 87 250 33 2 5700 3 37 45 590 -24 128 100 34 3 5760 3 51 54 1450 25 139 60 35 ... 5720 4 69 35 1568 15 121 60 36 330 5550 4 85 39 5000 8 44 100 390 nlevels: vh=53 wind=11 humidity=65 temp=63 ibh=196 dpg=128 ibt=193 vis=24 doy=325 --get.plotmo.y for earth object get.data.for.formula: using y from "ozone1" passed to earth got y from object$call$formula get.plotmo.y returned length 330 min 1 max 38 value 3 5 5 6 4 4 6 7 4 6 ... clip.limits 1 38 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "ibt" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 -25.000000 120 205.5 2 5760 5 64 62 2112.5 24 -17.714286 120 205.5 3 5760 5 64 62 2112.5 24 -10.428571 120 205.5 ... 5760 5 64 62 2112.5 24 -3.142857 120 205.5 50 5760 5 64 62 2112.5 24 332.000000 120 205.5 predict.earth(xgrid, type="response") column "O3" returned length 50 min 3.947176 max 15.71664 value 3.947176 4.279536 4.611896 4.944256 5.276616 5.608977 5.941337 6.273697 6.606057 6.938417 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "ibh:dpg" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 -69 167.5 120 205.5 2 5760 5 64 62 368.3158 -69 167.5 120 205.5 3 5760 5 64 62 625.6316 -69 167.5 120 205.5 ... 5760 5 64 62 882.9474 -69 167.5 120 205.5 400 5760 5 64 62 5000.0000 107 167.5 120 205.5 predict.earth(xgrid, type="response") column "O3" returned length 400 min 5.537547 max 14.25387 value 5.537547 7.878725 10.2199 12.56108 14.25387 14.25387 14.25387 14.25387 14.25387 14.25387 ... ylim 3.947176 15.71664 grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 persp(ibh:dpg) theta 235 ylim 3.95 15.7 cex 0.83 > > caption <- "test 5 x 5 layout" > dopar(1,1,caption) test 5 x 5 layout > a <- earth(O3 ~ ., data=ozone1, nk=51, pmethod="n", degree=2) > plotmo(a, xlab="", ylab="", caption=caption, trace=1) --get.plotmo.x for earth object get.data.for.formula: using x from "ozone1" passed to earth got x with colnames from object$call$formula x[330,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5710 4 28 40 2693 -25 87 250 33 2 5700 3 37 45 590 -24 128 100 34 3 5760 3 51 54 1450 25 139 60 35 ... 5720 4 69 35 1568 15 121 60 36 330 5550 4 85 39 5000 8 44 100 390 nlevels: vh=53 wind=11 humidity=65 temp=63 ibh=196 dpg=128 ibt=193 vis=24 doy=325 --get.plotmo.y for earth object get.data.for.formula: using y from "ozone1" passed to earth got y from object$call$formula get.plotmo.y returned length 330 min 1 max 38 value 3 5 5 6 4 4 6 7 4 6 ... clip.limits 1 38 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 205.5 2 5760 5 64 26.38776 2112.5 24 167.5 120 205.5 3 5760 5 64 27.77551 2112.5 24 167.5 120 205.5 ... 5760 5 64 29.16327 2112.5 24 167.5 120 205.5 50 5760 5 64 93.00000 2112.5 24 167.5 120 205.5 predict.earth(xgrid, type="response") column "O3" returned length 50 min -52.26858 max 18.61951 value 9.631048 9.692927 9.754806 9.816685 9.878564 9.940442 10.00232 10.0642 10.12608 10.18796 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "vh:temp" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5320.000 5 64 25 2112.5 24 167.5 120 205.5 2 5353.158 5 64 25 2112.5 24 167.5 120 205.5 3 5386.316 5 64 25 2112.5 24 167.5 120 205.5 ... 5419.474 5 64 25 2112.5 24 167.5 120 205.5 400 5950.000 5 64 93 2112.5 24 167.5 120 205.5 predict.earth(xgrid, type="response") column "O3" returned length 400 min -77.76078 max 32.37834 value 8.873429 8.930522 8.987615 9.044709 9.101802 9.158895 9.215989 9.273082 9.330176 9.387269 ... ylim 1.159648 36.30875 grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 persp(vh:temp) theta 235 ylim 1.16 36.3 cex 0.66 persp(vh:vis) theta 235 ylim 1.16 36.3 cex 0.66 persp(vh:doy) theta -35 ylim 1.16 36.3 cex 0.66 persp(wind:temp) theta 145 ylim 1.16 36.3 cex 0.66 persp(wind:ibt) theta -35 ylim 1.16 36.3 cex 0.66 persp(wind:vis) theta 145 ylim 1.16 36.3 cex 0.66 persp(humidity:temp) theta 145 ylim 1.16 36.3 cex 0.66 persp(humidity:ibt) theta -35 ylim 1.16 36.3 cex 0.66 persp(temp:dpg) theta 235 ylim 1.16 36.3 cex 0.66 persp(temp:ibt) theta 235 ylim 1.16 36.3 cex 0.66 persp(temp:vis) theta 145 ylim 1.16 36.3 cex 0.66 persp(temp:doy) theta -35 ylim 1.16 36.3 cex 0.66 persp(ibh:dpg) theta 235 ylim 1.16 36.3 cex 0.66 persp(ibh:ibt) theta 55 ylim 1.16 36.3 cex 0.66 persp(dpg:vis) theta 55 ylim 1.16 36.3 cex 0.66 persp(ibt:vis) theta -35 ylim 1.16 36.3 cex 0.66 > > caption <- "test 4 x 4 layout with ylab" > dopar(1,1,caption) test 4 x 4 layout with ylab > a <- earth(O3 ~ ., data=ozone1, nk=30, pmethod="n", degree=2) > plotmo(a, xlab="", ylab="ozone", caption=caption, trace=2) --get.plotmo.x for earth object formula O3 ~ . stripped formula O3~. get.data.for.formula: using x from "ozone1" passed to earth about to eval model.frame(formula=O3~., data=structure(list(O3=c(3, 5, 5, 6, 4, 4, 6, 7, 4, 6, 5, 4, 4, 7, 5, 9, 4, 3, 4, 4, 5, 6, 9, 6, 6, 11, 10, 7, 12, 9, 2, 3, 3, 2, 3, 3, 4, 6, 8, 6, 4, 3, 7, 11, 13, 6, 5, 4, 4, 6, 10, 15, 23, 17, 7, 2, 3, 3, 4, 6, 7, 7, 6, 3, 2, 8, 12, 12, 16, 9, 24, 13, 8, 10, 8, 9, 10, 14, 9, 11, 7, 9, 12, 12, 8, 9, 5, 4, 4, 9, 13, 5, 10, 10, 7, 5, 4, 7, 3, 4, 7, 11, 15, 22, 17, 7, 10, 19, 18, 12, 6, 9, 19, 21, 29, 16, 11, 2, 12, 16, 22, 20, 27, 33, 25, 31, 18, 24, 16, 12, 9, ... got x with colnames from object$call$formula x[330,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5710 4 28 40 2693 -25 87 250 33 2 5700 3 37 45 590 -24 128 100 34 3 5760 3 51 54 1450 25 139 60 35 ... 5720 4 69 35 1568 15 121 60 36 330 5550 4 85 39 5000 8 44 100 390 nlevels: vh=53 wind=11 humidity=65 temp=63 ibh=196 dpg=128 ibt=193 vis=24 doy=325 --get.plotmo.y for earth object formula O3 ~ . stripped formula O3~. get.data.for.formula: using y from "ozone1" passed to earth about to eval model.frame(formula=O3~., data=structure(list(O3=c(3, 5, 5, 6, 4, 4, 6, 7, 4, 6, 5, 4, 4, 7, 5, 9, 4, 3, 4, 4, 5, 6, 9, 6, 6, 11, 10, 7, 12, 9, 2, 3, 3, 2, 3, 3, 4, 6, 8, 6, 4, 3, 7, 11, 13, 6, 5, 4, 4, 6, 10, 15, 23, 17, 7, 2, 3, 3, 4, 6, 7, 7, 6, 3, 2, 8, 12, 12, 16, 9, 24, 13, 8, 10, 8, 9, 10, 14, 9, 11, 7, 9, 12, 12, 8, 9, 5, 4, 4, 9, 13, 5, 10, 10, 7, 5, 4, 7, 3, 4, 7, 11, 15, 22, 17, 7, 10, 19, 18, 12, 6, 9, 19, 21, 29, 16, 11, 2, 12, 16, 22, 20, 27, 33, 25, 31, 18, 24, 16, 12, 9, ... got y from object$call$formula get.plotmo.y returned length 330 min 1 max 38 value 3 5 5 6 4 4 6 7 4 6 ... clip.limits 1 38 --get.plotmo.singles for earth object singles: 4 temp, 5 ibh, 7 ibt, 8 vis, 9 doy --get.plotmo.pairs for earth object pairs: [,1] [,2] [1,] "1 vh" "8 vis" [2,] "1 vh" "9 doy" [3,] "2 wind" "7 ibt" [4,] "2 wind" "8 vis" [5,] "3 humidity" "4 temp" [6,] "4 temp" "6 dpg" [7,] "4 temp" "8 vis" [8,] "4 temp" "9 doy" [9,] "5 ibh" "6 dpg" --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 205.5 2 5760 5 64 26.38776 2112.5 24 167.5 120 205.5 3 5760 5 64 27.77551 2112.5 24 167.5 120 205.5 ... 5760 5 64 29.16327 2112.5 24 167.5 120 205.5 50 5760 5 64 93.00000 2112.5 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 205.5 2 5760 5 64 26.38776 2112.5 24 167.5 120 205.5 3 5760 5 64 27.77551 2112.5 24 167.5 120 205.5 4 5760 5 64 29.16327 2112.5 24 167.5 120 205.5 5 5760 5 64 30.55102 2112.5 24 167.5 120 205.5 6 5760 5 64 31.93878 2112.5 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 205.5 2 5760 5 64 26.38776 2112.5 24 167.5 120 205.5 3 5760 5 64 27.77551 2112.5 24 167.5 120 205.5 4 5760 5 64 29.16327 2112.5 24 167.5 120 205.5 5 5760 5 64 30.55102 2112.5 24 167.5 120 205.5 6 5760 5 64 31.93878 2112.5 24 167.5 120 205.5 predict.earth: bx is a 50 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 0 33.00000 1043.5 0 116.5 [2,] 1 0 31.61224 1043.5 0 116.5 [3,] 1 0 30.22449 1043.5 0 116.5 [4,] 1 0 28.83673 1043.5 0 116.5 [5,] 1 0 27.44898 1043.5 0 116.5 [6,] 1 0 26.06122 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 [5,] 0 0 0 [6,] 0 0 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 0 0 80 [2,] 0 0 0 80 [3,] 0 0 0 80 [4,] 0 0 0 80 [5,] 0 0 0 80 [6,] 0 0 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 0 [2,] 0 0 65.5 0 [3,] 0 0 65.5 0 [4,] 0 0 65.5 0 [5,] 0 0 65.5 0 [6,] 0 0 65.5 0 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 50 min 10.19363 max 23.79293 value 10.19363 10.20561 10.21759 10.22957 10.24156 10.25354 10.26552 10.2775 10.28949 10.30147 ... plotmo.predict(type="response") for degree1 plot "ibh" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 24 167.5 120 205.5 2 5760 5 64 62 210.7755 24 167.5 120 205.5 3 5760 5 64 62 310.5510 24 167.5 120 205.5 ... 5760 5 64 62 410.3265 24 167.5 120 205.5 50 5760 5 64 62 5000.0000 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 24 167.5 120 205.5 2 5760 5 64 62 210.7755 24 167.5 120 205.5 3 5760 5 64 62 310.5510 24 167.5 120 205.5 4 5760 5 64 62 410.3265 24 167.5 120 205.5 5 5760 5 64 62 510.1020 24 167.5 120 205.5 6 5760 5 64 62 609.8776 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 24 167.5 120 205.5 2 5760 5 64 62 210.7755 24 167.5 120 205.5 3 5760 5 64 62 310.5510 24 167.5 120 205.5 4 5760 5 64 62 410.3265 24 167.5 120 205.5 5 5760 5 64 62 510.1020 24 167.5 120 205.5 6 5760 5 64 62 609.8776 24 167.5 120 205.5 predict.earth: bx is a 50 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 0 958.0000 116.5 [2,] 1 4 0 0 858.2245 116.5 [3,] 1 4 0 0 758.4490 116.5 [4,] 1 4 0 0 658.6735 116.5 [5,] 1 4 0 0 558.8980 116.5 [6,] 1 4 0 0 459.1224 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 80 [2,] 0 120 0 80 [3,] 0 120 0 80 [4,] 0 120 0 80 [5,] 0 120 0 80 [6,] 0 120 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 19160.000 0 65.5 186 [2,] 17164.490 0 65.5 186 [3,] 15168.980 0 65.5 186 [4,] 13173.469 0 65.5 186 [5,] 11177.959 0 65.5 186 [6,] 9182.449 0 65.5 186 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 50 min 11.78286 max 14.18131 value 14.18131 14.06821 13.95512 13.84202 13.72892 13.61583 13.50273 13.38963 13.27653 13.16344 ... plotmo.predict(type="response") for degree1 plot "ibt" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 -25.000000 120 205.5 2 5760 5 64 62 2112.5 24 -17.714286 120 205.5 3 5760 5 64 62 2112.5 24 -10.428571 120 205.5 ... 5760 5 64 62 2112.5 24 -3.142857 120 205.5 50 5760 5 64 62 2112.5 24 332.000000 120 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 -25.000000 120 205.5 2 5760 5 64 62 2112.5 24 -17.714286 120 205.5 3 5760 5 64 62 2112.5 24 -10.428571 120 205.5 4 5760 5 64 62 2112.5 24 -3.142857 120 205.5 5 5760 5 64 62 2112.5 24 4.142857 120 205.5 6 5760 5 64 62 2112.5 24 11.428571 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 -25.000000 120 205.5 2 5760 5 64 62 2112.5 24 -17.714286 120 205.5 3 5760 5 64 62 2112.5 24 -10.428571 120 205.5 4 5760 5 64 62 2112.5 24 -3.142857 120 205.5 5 5760 5 64 62 2112.5 24 4.142857 120 205.5 6 5760 5 64 62 2112.5 24 11.428571 120 205.5 predict.earth: bx is a 50 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 116.5 [2,] 1 4 0 1043.5 0 116.5 [3,] 1 4 0 1043.5 0 116.5 [4,] 1 4 0 1043.5 0 116.5 [5,] 1 4 0 1043.5 0 116.5 [6,] 1 4 0 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 80 [2,] 0 120 0 80 [3,] 0 120 0 80 [4,] 0 120 0 80 [5,] 0 120 0 80 [6,] 0 120 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 258.0000 186 [2,] 0 0 250.7143 186 [3,] 0 0 243.4286 186 [4,] 0 0 236.1429 186 [5,] 0 0 228.8571 186 [6,] 0 0 221.5714 186 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 50 min 6.685976 max 17.32826 value 6.685976 6.915372 7.144768 7.374165 7.603561 7.832957 8.062353 8.291749 8.521145 8.750542 ... plotmo.predict(type="response") for degree1 plot "vis" with newdata[24,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 0 205.5 2 5760 5 64 62 2112.5 24 167.5 2 205.5 3 5760 5 64 62 2112.5 24 167.5 4 205.5 ... 5760 5 64 62 2112.5 24 167.5 6 205.5 24 5760 5 64 62 2112.5 24 167.5 350 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 24 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 0 205.5 2 5760 5 64 62 2112.5 24 167.5 2 205.5 3 5760 5 64 62 2112.5 24 167.5 4 205.5 4 5760 5 64 62 2112.5 24 167.5 6 205.5 5 5760 5 64 62 2112.5 24 167.5 7 205.5 6 5760 5 64 62 2112.5 24 167.5 10 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 24 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 0 205.5 2 5760 5 64 62 2112.5 24 167.5 2 205.5 3 5760 5 64 62 2112.5 24 167.5 4 205.5 4 5760 5 64 62 2112.5 24 167.5 6 205.5 5 5760 5 64 62 2112.5 24 167.5 7 205.5 6 5760 5 64 62 2112.5 24 167.5 10 205.5 predict.earth: bx is a 24 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 116.5 [2,] 1 4 0 1043.5 0 116.5 [3,] 1 4 0 1043.5 0 116.5 [4,] 1 4 0 1043.5 0 116.5 [5,] 1 4 0 1043.5 0 116.5 [6,] 1 4 0 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 200 [2,] 0 120 0 198 [3,] 0 120 0 196 [4,] 0 120 0 194 [5,] 0 120 0 193 [6,] 0 120 0 190 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 400 0 [2,] 0 396 0 [3,] 0 392 0 [4,] 0 388 0 [5,] 0 386 0 [6,] 0 380 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 186 [2,] 0 0 65.5 186 [3,] 0 0 65.5 186 [4,] 0 0 65.5 186 [5,] 0 0 65.5 186 [6,] 0 0 65.5 186 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 24 min 10.93731 max 15.46149 value 15.46149 15.41624 15.371 15.32576 15.30314 15.23528 15.07693 15.00907 14.85072 14.78286 ... plotmo.predict(type="response") for degree1 plot "doy" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 120 33.00000 2 5760 5 64 62 2112.5 24 167.5 120 40.28571 3 5760 5 64 62 2112.5 24 167.5 120 47.57143 ... 5760 5 64 62 2112.5 24 167.5 120 54.85714 50 5760 5 64 62 2112.5 24 167.5 120 390.00000 get.earth.x from model.matrix.earth from predict.earth: x is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 120 33.00000 2 5760 5 64 62 2112.5 24 167.5 120 40.28571 3 5760 5 64 62 2112.5 24 167.5 120 47.57143 4 5760 5 64 62 2112.5 24 167.5 120 54.85714 5 5760 5 64 62 2112.5 24 167.5 120 62.14286 6 5760 5 64 62 2112.5 24 167.5 120 69.42857 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 120 33.00000 2 5760 5 64 62 2112.5 24 167.5 120 40.28571 3 5760 5 64 62 2112.5 24 167.5 120 47.57143 4 5760 5 64 62 2112.5 24 167.5 120 54.85714 5 5760 5 64 62 2112.5 24 167.5 120 62.14286 6 5760 5 64 62 2112.5 24 167.5 120 69.42857 predict.earth: bx is a 50 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 0 [2,] 1 4 0 1043.5 0 0 [3,] 1 4 0 1043.5 0 0 [4,] 1 4 0 1043.5 0 0 [5,] 1 4 0 1043.5 0 0 [6,] 1 4 0 1043.5 0 0 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 56.00000 32 0 [2,] 48.71429 32 0 [3,] 41.42857 32 0 [4,] 34.14286 32 0 [5,] 26.85714 32 0 [6,] 19.57143 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 80 [2,] 0 120 0 80 [3,] 0 120 0 80 [4,] 0 120 0 80 [5,] 0 120 0 80 [6,] 0 120 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 0 [2,] 0 0 65.5 0 [3,] 0 0 65.5 0 [4,] 0 0 65.5 0 [5,] 0 0 65.5 0 [6,] 0 0 65.5 0 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 50 min 6.393779 max 14.11835 value 6.393779 7.399001 8.404223 9.409444 10.41467 11.41989 12.42511 13.43033 14.11835 14.11249 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "vh:vis" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5320.000 5 64 62 2112.5 24 167.5 0 205.5 2 5353.158 5 64 62 2112.5 24 167.5 0 205.5 3 5386.316 5 64 62 2112.5 24 167.5 0 205.5 ... 5419.474 5 64 62 2112.5 24 167.5 0 205.5 400 5950.000 5 64 62 2112.5 24 167.5 350 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5320.000 5 64 62 2112.5 24 167.5 0 205.5 2 5353.158 5 64 62 2112.5 24 167.5 0 205.5 3 5386.316 5 64 62 2112.5 24 167.5 0 205.5 4 5419.474 5 64 62 2112.5 24 167.5 0 205.5 5 5452.632 5 64 62 2112.5 24 167.5 0 205.5 6 5485.789 5 64 62 2112.5 24 167.5 0 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5320.000 5 64 62 2112.5 24 167.5 0 205.5 2 5353.158 5 64 62 2112.5 24 167.5 0 205.5 3 5386.316 5 64 62 2112.5 24 167.5 0 205.5 4 5419.474 5 64 62 2112.5 24 167.5 0 205.5 5 5452.632 5 64 62 2112.5 24 167.5 0 205.5 6 5485.789 5 64 62 2112.5 24 167.5 0 205.5 predict.earth: bx is a 400 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 116.5 [2,] 1 4 0 1043.5 0 116.5 [3,] 1 4 0 1043.5 0 116.5 [4,] 1 4 0 1043.5 0 116.5 [5,] 1 4 0 1043.5 0 116.5 [6,] 1 4 0 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 200 [2,] 0 120 0 200 [3,] 0 120 0 200 [4,] 0 120 0 200 [5,] 0 120 0 200 [6,] 0 120 0 200 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 400 0 [2,] 0 400 0 [3,] 0 400 0 [4,] 0 400 0 [5,] 0 400 0 [6,] 0 400 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 186 [2,] 0 0 65.5 186 [3,] 0 0 65.5 186 [4,] 0 0 65.5 186 [5,] 0 0 65.5 186 [6,] 0 0 65.5 186 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min 6.961201 max 33.94195 value 6.961201 7.601773 8.242345 8.882917 9.523488 10.16406 10.80463 11.4452 12.08578 12.72635 ... plotmo.predict(type="response") for degree2 plot "vh:doy" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5320.000 5 64 62 2112.5 24 167.5 120 33 2 5353.158 5 64 62 2112.5 24 167.5 120 33 3 5386.316 5 64 62 2112.5 24 167.5 120 33 ... 5419.474 5 64 62 2112.5 24 167.5 120 33 400 5950.000 5 64 62 2112.5 24 167.5 120 390 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5320.000 5 64 62 2112.5 24 167.5 120 33 2 5353.158 5 64 62 2112.5 24 167.5 120 33 3 5386.316 5 64 62 2112.5 24 167.5 120 33 4 5419.474 5 64 62 2112.5 24 167.5 120 33 5 5452.632 5 64 62 2112.5 24 167.5 120 33 6 5485.789 5 64 62 2112.5 24 167.5 120 33 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5320.000 5 64 62 2112.5 24 167.5 120 33 2 5353.158 5 64 62 2112.5 24 167.5 120 33 3 5386.316 5 64 62 2112.5 24 167.5 120 33 4 5419.474 5 64 62 2112.5 24 167.5 120 33 5 5452.632 5 64 62 2112.5 24 167.5 120 33 6 5485.789 5 64 62 2112.5 24 167.5 120 33 predict.earth: bx is a 400 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 0 [2,] 1 4 0 1043.5 0 0 [3,] 1 4 0 1043.5 0 0 [4,] 1 4 0 1043.5 0 0 [5,] 1 4 0 1043.5 0 0 [6,] 1 4 0 1043.5 0 0 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 56 32 0 [2,] 56 32 0 [3,] 56 32 0 [4,] 56 32 0 [5,] 56 32 0 [6,] 56 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 80 [2,] 0 120 0 80 [3,] 0 120 0 80 [4,] 0 120 0 80 [5,] 0 120 0 80 [6,] 0 120 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 0 [2,] 0 0 65.5 0 [3,] 0 0 65.5 0 [4,] 0 0 65.5 0 [5,] 0 0 65.5 0 [6,] 0 0 65.5 0 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min 1.968374 max 21.96595 value 1.968374 2.301868 2.635361 2.968854 3.302348 3.635841 3.969335 4.302828 4.636322 4.969815 ... plotmo.predict(type="response") for degree2 plot "wind:ibt" with newdata[220,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 -25 120 205.5 2 5760 2 64 62 2112.5 24 -25 120 205.5 3 5760 3 64 62 2112.5 24 -25 120 205.5 ... 5760 4 64 62 2112.5 24 -25 120 205.5 220 5760 11 64 62 2112.5 24 332 120 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 220 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 -25 120 205.5 2 5760 2 64 62 2112.5 24 -25 120 205.5 3 5760 3 64 62 2112.5 24 -25 120 205.5 4 5760 4 64 62 2112.5 24 -25 120 205.5 5 5760 5 64 62 2112.5 24 -25 120 205.5 6 5760 6 64 62 2112.5 24 -25 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 220 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 -25 120 205.5 2 5760 2 64 62 2112.5 24 -25 120 205.5 3 5760 3 64 62 2112.5 24 -25 120 205.5 4 5760 4 64 62 2112.5 24 -25 120 205.5 5 5760 5 64 62 2112.5 24 -25 120 205.5 6 5760 6 64 62 2112.5 24 -25 120 205.5 predict.earth: bx is a 220 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 116.5 [2,] 1 4 0 1043.5 0 116.5 [3,] 1 4 0 1043.5 0 116.5 [4,] 1 4 0 1043.5 0 116.5 [5,] 1 4 0 1043.5 0 116.5 [6,] 1 4 0 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 80 [2,] 0 120 0 80 [3,] 0 120 0 80 [4,] 0 120 0 80 [5,] 0 120 0 80 [6,] 0 120 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 560 0 [2,] 0 400 0 [3,] 0 320 0 [4,] 0 240 0 [5,] 0 160 0 [6,] 0 80 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 258 186 [2,] 0 0 258 186 [3,] 0 0 258 186 [4,] 0 0 258 186 [5,] 0 0 258 186 [6,] 0 0 258 186 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 220 min -17.35449 max 20.19664 value 7.333874 7.074715 6.945135 6.815556 6.685976 6.556397 6.426817 5.549094 4.67137 3.793647 ... plotmo.predict(type="response") for degree2 plot "wind:vis" with newdata[220,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 167.5 0 205.5 2 5760 2 64 62 2112.5 24 167.5 0 205.5 3 5760 3 64 62 2112.5 24 167.5 0 205.5 ... 5760 4 64 62 2112.5 24 167.5 0 205.5 220 5760 11 64 62 2112.5 24 167.5 350 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 220 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 167.5 0 205.5 2 5760 2 64 62 2112.5 24 167.5 0 205.5 3 5760 3 64 62 2112.5 24 167.5 0 205.5 4 5760 4 64 62 2112.5 24 167.5 0 205.5 5 5760 5 64 62 2112.5 24 167.5 0 205.5 6 5760 6 64 62 2112.5 24 167.5 0 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 220 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 167.5 0 205.5 2 5760 2 64 62 2112.5 24 167.5 0 205.5 3 5760 3 64 62 2112.5 24 167.5 0 205.5 4 5760 4 64 62 2112.5 24 167.5 0 205.5 5 5760 5 64 62 2112.5 24 167.5 0 205.5 6 5760 6 64 62 2112.5 24 167.5 0 205.5 predict.earth: bx is a 220 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 116.5 [2,] 1 4 0 1043.5 0 116.5 [3,] 1 4 0 1043.5 0 116.5 [4,] 1 4 0 1043.5 0 116.5 [5,] 1 4 0 1043.5 0 116.5 [6,] 1 4 0 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 200 [2,] 0 120 0 200 [3,] 0 120 0 200 [4,] 0 120 0 200 [5,] 0 120 0 200 [6,] 0 120 0 200 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 1400 0 [2,] 0 1000 0 [3,] 0 800 0 [4,] 0 600 0 [5,] 0 400 0 [6,] 0 200 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 186 [2,] 0 0 65.5 186 [3,] 0 0 65.5 186 [4,] 0 0 65.5 186 [5,] 0 0 65.5 186 [6,] 0 0 65.5 186 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 220 min 6.036355 max 17.08123 value 17.08123 16.43333 16.10938 15.78544 15.46149 15.13754 14.81359 12.61928 10.42497 8.230663 ... plotmo.predict(type="response") for degree2 plot "humidity:temp" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 19.00000 25 2112.5 24 167.5 120 205.5 2 5760 5 22.89474 25 2112.5 24 167.5 120 205.5 3 5760 5 26.78947 25 2112.5 24 167.5 120 205.5 ... 5760 5 30.68421 25 2112.5 24 167.5 120 205.5 400 5760 5 93.00000 93 2112.5 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 19.00000 25 2112.5 24 167.5 120 205.5 2 5760 5 22.89474 25 2112.5 24 167.5 120 205.5 3 5760 5 26.78947 25 2112.5 24 167.5 120 205.5 4 5760 5 30.68421 25 2112.5 24 167.5 120 205.5 5 5760 5 34.57895 25 2112.5 24 167.5 120 205.5 6 5760 5 38.47368 25 2112.5 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 19.00000 25 2112.5 24 167.5 120 205.5 2 5760 5 22.89474 25 2112.5 24 167.5 120 205.5 3 5760 5 26.78947 25 2112.5 24 167.5 120 205.5 4 5760 5 30.68421 25 2112.5 24 167.5 120 205.5 5 5760 5 34.57895 25 2112.5 24 167.5 120 205.5 6 5760 5 38.47368 25 2112.5 24 167.5 120 205.5 predict.earth: bx is a 400 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 0 33 1043.5 0 116.5 [2,] 1 0 33 1043.5 0 116.5 [3,] 1 0 33 1043.5 0 116.5 [4,] 1 0 33 1043.5 0 116.5 [5,] 1 0 33 1043.5 0 116.5 [6,] 1 0 33 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 [5,] 0 0 0 [6,] 0 0 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 0 0 80 [2,] 0 0 0 80 [3,] 0 0 0 80 [4,] 0 0 0 80 [5,] 0 0 0 80 [6,] 0 0 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 0 [2,] 0 0 65.5 0 [3,] 0 0 65.5 0 [4,] 0 0 65.5 0 [5,] 0 0 65.5 0 [6,] 0 0 65.5 0 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min -1.366065 max 27.74789 value 10.19363 10.19363 10.19363 10.19363 10.19363 10.19363 10.19363 10.19363 10.19363 10.19363 ... plotmo.predict(type="response") for degree2 plot "temp:dpg" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 -69 167.5 120 205.5 2 5760 5 64 28.57895 2112.5 -69 167.5 120 205.5 3 5760 5 64 32.15789 2112.5 -69 167.5 120 205.5 ... 5760 5 64 35.73684 2112.5 -69 167.5 120 205.5 400 5760 5 64 93.00000 2112.5 107 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 -69 167.5 120 205.5 2 5760 5 64 28.57895 2112.5 -69 167.5 120 205.5 3 5760 5 64 32.15789 2112.5 -69 167.5 120 205.5 4 5760 5 64 35.73684 2112.5 -69 167.5 120 205.5 5 5760 5 64 39.31579 2112.5 -69 167.5 120 205.5 6 5760 5 64 42.89474 2112.5 -69 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 -69 167.5 120 205.5 2 5760 5 64 28.57895 2112.5 -69 167.5 120 205.5 3 5760 5 64 32.15789 2112.5 -69 167.5 120 205.5 4 5760 5 64 35.73684 2112.5 -69 167.5 120 205.5 5 5760 5 64 39.31579 2112.5 -69 167.5 120 205.5 6 5760 5 64 42.89474 2112.5 -69 167.5 120 205.5 predict.earth: bx is a 400 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 0 33.00000 1043.5 0 116.5 [2,] 1 0 29.42105 1043.5 0 116.5 [3,] 1 0 25.84211 1043.5 0 116.5 [4,] 1 0 22.26316 1043.5 0 116.5 [5,] 1 0 18.68421 1043.5 0 116.5 [6,] 1 0 15.10526 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 [5,] 0 0 0 [6,] 0 0 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 0 0 80 [2,] 0 0 0 80 [3,] 0 0 0 80 [4,] 0 0 0 80 [5,] 0 0 0 80 [6,] 0 0 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 0 [2,] 0 0 65.5 0 [3,] 0 0 65.5 0 [4,] 0 0 65.5 0 [5,] 0 0 65.5 0 [6,] 0 0 65.5 0 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min -18.96635 max 35.26416 value 10.19363 10.22453 10.25543 10.28633 10.31723 10.34813 10.37904 10.40994 10.44084 10.47174 ... plotmo.predict(type="response") for degree2 plot "temp:vis" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 0 205.5 2 5760 5 64 28.57895 2112.5 24 167.5 0 205.5 3 5760 5 64 32.15789 2112.5 24 167.5 0 205.5 ... 5760 5 64 35.73684 2112.5 24 167.5 0 205.5 400 5760 5 64 93.00000 2112.5 24 167.5 350 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 0 205.5 2 5760 5 64 28.57895 2112.5 24 167.5 0 205.5 3 5760 5 64 32.15789 2112.5 24 167.5 0 205.5 4 5760 5 64 35.73684 2112.5 24 167.5 0 205.5 5 5760 5 64 39.31579 2112.5 24 167.5 0 205.5 6 5760 5 64 42.89474 2112.5 24 167.5 0 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 0 205.5 2 5760 5 64 28.57895 2112.5 24 167.5 0 205.5 3 5760 5 64 32.15789 2112.5 24 167.5 0 205.5 4 5760 5 64 35.73684 2112.5 24 167.5 0 205.5 5 5760 5 64 39.31579 2112.5 24 167.5 0 205.5 6 5760 5 64 42.89474 2112.5 24 167.5 0 205.5 predict.earth: bx is a 400 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 0 33.00000 1043.5 0 116.5 [2,] 1 0 29.42105 1043.5 0 116.5 [3,] 1 0 25.84211 1043.5 0 116.5 [4,] 1 0 22.26316 1043.5 0 116.5 [5,] 1 0 18.68421 1043.5 0 116.5 [6,] 1 0 15.10526 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 [5,] 0 0 0 [6,] 0 0 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 0 0 200 [2,] 0 0 0 200 [3,] 0 0 0 200 [4,] 0 0 0 200 [5,] 0 0 0 200 [6,] 0 0 0 200 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 400 0 [2,] 0 400 0 [3,] 0 400 0 [4,] 0 400 0 [5,] 0 400 0 [6,] 0 400 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 0 [2,] 0 0 65.5 0 [3,] 0 0 65.5 0 [4,] 0 0 65.5 0 [5,] 0 0 65.5 0 [6,] 0 0 65.5 0 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min 7.733267 max 29.47475 value 13.89485 13.83031 13.76577 13.70123 13.63668 13.57214 13.5076 13.44306 13.37851 13.31397 ... plotmo.predict(type="response") for degree2 plot "temp:doy" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 33 2 5760 5 64 28.57895 2112.5 24 167.5 120 33 3 5760 5 64 32.15789 2112.5 24 167.5 120 33 ... 5760 5 64 35.73684 2112.5 24 167.5 120 33 400 5760 5 64 93.00000 2112.5 24 167.5 120 390 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 33 2 5760 5 64 28.57895 2112.5 24 167.5 120 33 3 5760 5 64 32.15789 2112.5 24 167.5 120 33 4 5760 5 64 35.73684 2112.5 24 167.5 120 33 5 5760 5 64 39.31579 2112.5 24 167.5 120 33 6 5760 5 64 42.89474 2112.5 24 167.5 120 33 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 33 2 5760 5 64 28.57895 2112.5 24 167.5 120 33 3 5760 5 64 32.15789 2112.5 24 167.5 120 33 4 5760 5 64 35.73684 2112.5 24 167.5 120 33 5 5760 5 64 39.31579 2112.5 24 167.5 120 33 6 5760 5 64 42.89474 2112.5 24 167.5 120 33 predict.earth: bx is a 400 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 0 33.00000 1043.5 0 0 [2,] 1 0 29.42105 1043.5 0 0 [3,] 1 0 25.84211 1043.5 0 0 [4,] 1 0 22.26316 1043.5 0 0 [5,] 1 0 18.68421 1043.5 0 0 [6,] 1 0 15.10526 1043.5 0 0 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 56 0 0 [2,] 56 0 0 [3,] 56 0 0 [4,] 56 0 0 [5,] 56 0 0 [6,] 56 0 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 0 0 80 [2,] 0 0 0 80 [3,] 0 0 0 80 [4,] 0 0 0 80 [5,] 0 0 0 80 [6,] 0 0 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 0 0 65.5 0 [2,] 0 0 65.5 0 [3,] 0 0 65.5 0 [4,] 0 0 65.5 0 [5,] 0 0 65.5 0 [6,] 0 0 65.5 0 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min -1.554202 max 26.82396 value 6.291255 6.322156 6.353058 6.383959 6.41486 6.445762 6.476663 6.507565 6.538466 6.569367 ... plotmo.predict(type="response") for degree2 plot "ibh:dpg" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 -69 167.5 120 205.5 2 5760 5 64 62 368.3158 -69 167.5 120 205.5 3 5760 5 64 62 625.6316 -69 167.5 120 205.5 ... 5760 5 64 62 882.9474 -69 167.5 120 205.5 400 5760 5 64 62 5000.0000 107 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 -69 167.5 120 205.5 2 5760 5 64 62 368.3158 -69 167.5 120 205.5 3 5760 5 64 62 625.6316 -69 167.5 120 205.5 4 5760 5 64 62 882.9474 -69 167.5 120 205.5 5 5760 5 64 62 1140.2632 -69 167.5 120 205.5 6 5760 5 64 62 1397.5789 -69 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 -69 167.5 120 205.5 2 5760 5 64 62 368.3158 -69 167.5 120 205.5 3 5760 5 64 62 625.6316 -69 167.5 120 205.5 4 5760 5 64 62 882.9474 -69 167.5 120 205.5 5 5760 5 64 62 1140.2632 -69 167.5 120 205.5 6 5760 5 64 62 1397.5789 -69 167.5 120 205.5 predict.earth: bx is a 400 by 29 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis), 16=h(1069-ibh)*h(dpg-44), 17=h(1069-ibh)*h(44-dpg), 18=h(ibt-233), 19=h(233-ibt), 20=h(temp-58)*h(doy-159), ... First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 0.00000 958.0000 116.5 [2,] 1 4 0 0.00000 700.6842 116.5 [3,] 1 4 0 0.00000 443.3684 116.5 [4,] 1 4 0 0.00000 186.0526 116.5 [5,] 1 4 0 71.26316 0.0000 116.5 [6,] 1 4 0 328.57895 0.0000 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 492 0 80 [2,] 0 492 0 80 [3,] 0 492 0 80 [4,] 0 492 0 80 [5,] 0 492 0 80 [6,] 0 492 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) h(1069-ibh)*h(dpg-44) [1,] 0 160 0 [2,] 0 160 0 [3,] 0 160 0 [4,] 0 160 0 [5,] 0 160 0 [6,] 0 160 0 h(1069-ibh)*h(44-dpg) h(ibt-233) h(233-ibt) h(temp-58)*h(doy-159) [1,] 108254.00 0 65.5 186 [2,] 79177.32 0 65.5 186 [3,] 50100.63 0 65.5 186 [4,] 21023.95 0 65.5 186 [5,] 0.00 0 65.5 186 [6,] 0.00 0 65.5 186 Not all 29 columns were printed predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min -22.29304 max 16.31048 value 3.276258 6.265779 9.255301 12.24482 14.38261 14.29669 14.21077 14.12486 14.03894 13.95302 ... ylim 1.167407 35.26416 --plot.degree1(draw.plot=TRUE) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 --plot.degree2(draw.plot=TRUE) persp(vh:vis) theta 235 ylim 1.17 35.3 cex 0.66 persp(vh:doy) theta -35 ylim 1.17 35.3 cex 0.66 persp(wind:ibt) theta 145 ylim 1.17 35.3 cex 0.66 persp(wind:vis) theta 145 ylim 1.17 35.3 cex 0.66 persp(humidity:temp) theta -35 ylim 1.17 35.3 cex 0.66 persp(temp:dpg) theta 235 ylim 1.17 35.3 cex 0.66 persp(temp:vis) theta -35 ylim 1.17 35.3 cex 0.66 persp(temp:doy) theta -35 ylim 1.17 35.3 cex 0.66 persp(ibh:dpg) theta 235 ylim 1.17 35.3 cex 0.66 > > caption <- "test 3 x 3 layout" > dopar(1,1,caption) test 3 x 3 layout > a <- earth(O3 ~ ., data=ozone1, nk=16, pmethod="n", degree=2) > plotmo(a, xlab="", ylab="", caption=caption, trace=3) --get.plotmo.x for earth object formula O3 ~ . stripped formula O3~. get.data.for.formula: using x from "ozone1" passed to earth about to eval model.frame(formula=O3~., data=structure(list(O3=c(3, 5, 5, 6, 4, 4, 6, 7, 4, 6, 5, 4, 4, 7, 5, 9, 4, 3, 4, 4, 5, 6, 9, 6, 6, 11, 10, 7, 12, 9, 2, 3, 3, 2, 3, 3, 4, 6, 8, 6, 4, 3, 7, 11, 13, 6, 5, 4, 4, 6, 10, 15, 23, 17, 7, 2, 3, 3, 4, 6, 7, 7, 6, 3, 2, 8, 12, 12, 16, 9, 24, 13, 8, 10, 8, 9, 10, 14, 9, 11, 7, 9, 12, 12, 8, 9, 5, 4, 4, 9, 13, 5, 10, 10, 7, 5, 4, 7, 3, 4, 7, 11, 15, 22, 17, 7, 10, 19, 18, 12, 6, 9, 19, 21, 29, 16, 11, 2, 12, 16, 22, 20, 27, 33, 25, 31, 18, 24, 16, 12, 9, ... got x with colnames from object$call$formula x[330,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5710 4 28 40 2693 -25 87 250 33 2 5700 3 37 45 590 -24 128 100 34 3 5760 3 51 54 1450 25 139 60 35 4 5720 4 69 35 1568 15 121 60 36 5 5790 6 19 45 2631 -33 123 100 37 6 5790 3 25 55 554 -28 182 250 38 7 5700 3 73 41 2083 23 114 120 39 8 5700 3 59 44 2654 -2 91 120 40 9 5770 8 27 54 5000 -19 92 120 41 10 5720 3 44 51 111 9 173 150 42 11 5760 6 33 51 492 -44 181 40 43 12 5780 6 19 54 5000 -44 135 200 44 13 5830 3 19 58 1249 -53 243 250 45 14 5870 2 19 61 5000 -67 186 200 46 15 5840 5 19 64 5000 -40 174 200 47 16 5780 4 59 67 639 1 189 150 48 17 5680 5 73 52 393 -68 210 10 49 18 5720 4 19 54 5000 -66 126 140 50 19 5760 3 19 54 5000 -58 111 250 51 20 5730 4 26 58 5000 -26 111 200 52 21 5700 5 59 69 3044 18 116 150 53 22 5650 5 70 51 3641 23 87 140 54 23 5680 3 64 53 111 -10 153 50 55 24 5820 5 19 59 597 -52 214 70 57 25 5810 5 19 64 1791 -15 182 150 59 26 5790 3 28 63 793 -15 188 120 60 27 5800 2 32 63 531 -38 244 40 61 28 5820 5 19 62 419 -29 243 120 61 29 5770 8 76 63 816 -7 190 6 62 30 5670 3 69 54 3651 62 95 30 63 31 5590 3 76 36 5000 70 33 100 64 32 5410 6 64 31 5000 28 2 200 65 33 5350 7 62 30 1341 18 77 60 66 34 5480 9 72 36 5000 0 37 350 67 35 5600 7 76 42 3799 -18 77 250 68 36 5490 11 72 37 5000 32 34 350 69 37 5560 10 72 41 5000 -1 31 300 70 38 5700 3 32 46 5000 -30 77 300 71 39 5680 5 50 51 5000 -8 75 300 72 40 5700 4 86 55 2398 21 121 200 73 41 5650 5 61 41 5000 51 24 100 74 42 5610 5 62 41 4281 42 52 250 75 43 5730 5 66 49 1161 27 116 200 76 44 5770 5 68 45 2778 2 132 200 77 45 5770 3 82 55 442 26 146 40 78 46 5690 8 21 41 5000 -30 57 300 80 47 5700 3 19 45 5000 -53 66 300 81 48 5730 11 19 51 5000 -43 95 300 82 49 5690 7 19 53 5000 7 95 300 83 50 5640 5 68 50 5000 24 56 300 84 51 5720 6 63 60 1341 19 151 150 85 52 5740 3 54 54 1318 2 181 150 86 53 5740 3 47 53 885 -4 195 80 87 54 5740 3 56 53 360 3 195 40 88 55 5670 7 61 44 3497 73 97 40 89 56 5550 10 74 40 5000 73 45 80 91 57 5470 7 46 30 5000 44 -15 300 92 58 5320 11 45 25 5000 39 -25 200 93 59 5530 3 43 40 5000 -12 9 140 95 60 5600 3 21 45 5000 -2 39 140 96 61 5660 7 57 51 5000 30 56 140 97 62 5580 5 42 48 3608 24 41 100 98 63 5510 5 50 45 5000 38 5 140 99 64 5530 5 61 47 5000 56 20 200 100 65 5620 9 61 43 5000 66 13 120 101 66 5690 0 60 49 613 -27 154 300 102 67 5760 4 31 56 334 -9 180 300 103 68 5740 3 66 53 567 13 166 150 104 69 5780 5 53 61 488 -20 183 2 105 70 5790 2 42 63 531 -15 217 50 106 71 5760 3 60 70 508 7 192 70 107 72 5700 4 82 57 1571 68 135 17 108 73 5680 4 57 35 721 28 130 140 109 74 5720 5 21 52 505 -49 196 140 110 75 5720 5 19 59 377 -27 229 300 111 76 5730 4 32 67 442 -9 243 200 112 77 5710 5 77 57 902 54 158 250 113 78 5720 4 71 42 1381 4 135 60 115 79 5710 3 19 55 5000 -16 100 100 116 80 5600 6 45 40 5000 38 83 150 117 81 5630 4 44 39 1302 40 115 150 118 82 5690 7 70 57 1292 -5 120 200 119 83 5730 6 45 58 5000 -14 115 100 120 84 5710 3 46 62 472 34 172 300 121 85 5610 6 50 51 1404 42 125 120 121 86 5680 5 69 61 944 35 132 100 122 87 5620 6 67 34 5000 75 18 200 123 88 5420 7 69 35 5000 41 -6 200 124 89 5540 5 54 35 5000 62 8 200 125 90 5590 6 51 48 5000 44 56 300 126 91 5690 6 63 59 2014 31 119 300 127 92 5550 7 63 41 5000 56 29 250 128 93 5620 7 57 58 5000 27 87 120 129 94 5630 6 61 51 524 57 126 140 130 95 5580 7 78 46 5000 55 36 200 131 96 5560 4 65 40 5000 59 18 140 132 97 5440 5 44 35 5000 24 3 80 133 98 5480 7 51 46 2490 29 86 300 134 99 5620 5 73 39 5000 107 -4 100 135 100 5450 11 35 32 5000 36 8 300 136 101 5660 6 35 47 5000 28 41 200 137 102 5680 6 61 50 1144 30 120 120 138 103 5760 4 50 65 547 1 194 100 139 104 5790 4 57 66 413 10 209 120 140 105 5720 5 68 69 610 46 176 60 141 106 5660 6 58 59 3638 81 107 120 142 107 5710 5 65 64 3848 45 138 100 143 108 5780 7 78 68 1479 40 200 100 144 109 5750 7 73 49 1108 55 186 27 145 110 5700 5 41 52 869 0 145 40 146 111 5620 9 47 56 5000 43 35 140 147 112 5650 6 46 55 5000 49 33 150 148 113 5730 5 61 66 1148 31 160 100 149 114 5810 4 55 74 856 4 241 100 150 115 5790 4 60 76 807 16 228 120 151 116 5740 8 78 70 2040 46 175 150 152 117 5690 4 71 67 314 60 150 120 154 118 5680 6 77 41 5000 75 49 120 156 119 5650 8 66 61 1410 20 129 140 157 120 5730 6 74 68 360 23 169 120 158 121 5730 3 78 69 1568 32 198 70 159 122 5760 7 78 74 1184 40 204 80 160 123 5830 6 75 74 898 24 230 70 161 124 5880 3 80 80 436 0 302 40 162 125 5890 6 88 84 774 6 300 20 163 126 5850 4 76 78 1181 50 266 17 164 127 5820 6 63 80 1991 47 209 40 165 128 5800 7 78 76 1597 56 200 50 167 129 5740 3 74 74 1184 52 208 70 168 130 5710 7 63 66 3005 58 151 80 169 131 5720 8 62 66 2880 53 141 120 170 132 5740 5 53 69 2125 64 150 100 172 133 5690 9 62 62 3720 74 105 120 174 134 5730 5 71 67 4337 66 152 200 175 135 5780 3 68 80 2053 31 227 120 176 136 5790 7 79 76 1958 70 214 40 177 137 5750 3 76 65 3644 86 152 70 178 138 5680 6 71 65 1368 75 147 100 179 139 5720 3 66 63 3539 73 120 120 180 140 5770 4 81 62 2785 49 174 100 181 141 5800 4 72 68 984 26 207 120 181 142 5780 8 92 68 1804 56 200 70 182 143 5740 6 71 69 3234 77 171 80 183 144 5730 6 64 66 3441 67 161 100 184 145 5760 6 68 70 1578 61 160 100 185 146 5770 7 59 70 1850 76 160 120 186 147 5690 8 67 64 2962 80 152 120 187 148 5650 6 66 61 2670 54 130 120 188 149 5610 3 61 52 5000 76 56 150 189 150 5570 9 81 48 5000 57 49 140 190 151 5690 5 63 59 5000 46 107 140 191 152 5760 3 58 67 987 28 177 140 192 153 5810 5 68 66 1148 43 194 140 193 154 5830 4 71 74 898 -24 255 60 194 155 5880 6 67 83 777 -1 281 30 195 156 5860 3 64 78 1279 75 220 17 196 157 5830 6 64 75 1046 69 204 80 197 158 5870 4 69 84 1167 50 235 60 198 159 5860 3 77 81 987 45 243 100 199 160 5800 3 61 79 1144 57 218 120 200 161 5800 4 69 79 977 60 215 150 201 162 5770 5 64 65 770 26 242 120 202 163 5860 4 33 81 629 -11 302 140 203 164 5870 7 38 84 337 -14 321 140 204 165 5870 4 54 83 590 26 295 120 205 166 5860 6 39 90 400 19 285 120 206 167 5880 5 43 90 580 9 307 80 207 168 5870 7 55 93 646 25 318 140 208 169 5860 4 77 88 826 41 291 140 209 170 5830 5 63 72 823 52 236 150 210 171 5820 5 65 72 2116 47 213 120 211 172 5820 8 64 70 2972 52 180 120 212 173 5860 6 68 78 2752 41 211 140 213 174 5870 3 76 87 1377 37 258 100 214 175 5890 6 71 91 1486 33 266 50 215 176 5900 6 86 87 990 22 295 40 216 177 5890 5 65 91 508 29 296 100 217 178 5910 4 73 88 1204 56 266 100 219 179 5900 5 69 83 2414 63 247 60 220 180 5860 3 64 78 2385 67 213 50 221 181 5830 3 63 79 2326 64 218 70 222 182 5850 9 72 77 3389 56 204 80 223 183 5830 6 82 81 2818 58 221 80 224 184 5810 8 69 76 2394 54 209 90 226 185 5830 4 74 78 2746 61 208 120 227 186 5830 5 69 75 2493 55 225 120 228 187 5840 7 72 82 1528 42 233 100 229 188 5870 6 73 84 111 40 256 60 230 189 5870 4 90 86 1899 45 247 40 231 190 5860 3 80 80 1289 32 240 40 233 191 5900 3 73 80 984 35 260 70 234 192 5890 4 71 84 836 28 275 80 235 193 5880 4 78 84 826 27 263 80 236 194 5890 6 80 81 1105 39 234 80 237 195 5870 8 74 85 1023 46 251 80 238 196 5820 6 63 73 2956 46 196 120 241 197 5780 6 57 72 2988 56 187 150 241 198 5770 3 55 68 4291 60 168 200 242 199 5790 4 65 65 3330 59 148 150 243 200 5840 7 65 79 1233 30 214 100 249 201 5910 5 72 81 1069 28 235 80 251 202 5890 5 79 80 984 57 230 70 252 203 5870 6 62 76 1653 71 204 60 253 204 5780 7 65 59 3930 68 151 150 254 205 5730 5 77 55 5000 73 109 200 255 206 5780 7 70 66 5000 45 107 200 256 207 5750 7 58 64 4212 46 138 200 257 208 5760 5 58 62 5000 52 99 250 258 209 5730 7 72 67 5000 31 141 300 259 210 5730 5 77 74 1545 43 187 70 260 211 5790 4 57 74 994 44 209 300 261 212 5750 3 67 70 1125 55 200 150 262 213 5880 3 73 77 636 16 233 300 263 214 5890 7 70 83 748 32 250 30 264 215 5880 4 73 81 692 44 254 100 265 216 5870 7 73 73 807 39 260 100 266 217 5900 6 71 87 869 19 261 17 267 218 5920 4 77 89 800 24 298 20 268 219 5930 3 68 92 393 6 332 4 269 220 5950 5 62 92 557 0 326 70 270 221 5950 8 61 93 620 27 298 30 271 222 5900 5 71 93 1404 33 293 70 271 223 5890 8 77 86 898 21 270 60 272 224 5860 7 71 76 377 -2 285 40 273 225 5840 5 67 81 528 17 260 50 274 226 5800 6 74 78 2818 26 226 70 275 227 5760 7 65 73 3247 10 196 140 276 228 5810 6 82 80 895 0 256 100 277 229 5850 4 67 81 721 0 268 120 278 230 5760 7 87 52 5000 39 110 150 281 231 5860 4 71 63 1965 13 161 50 282 232 5830 5 77 72 1853 10 216 70 283 233 5840 5 78 75 2342 7 219 40 284 234 5800 7 72 55 5000 56 109 70 285 235 5790 3 71 61 4028 35 128 140 287 236 5830 5 71 71 2716 26 176 140 288 237 5810 5 76 71 3671 31 188 100 289 238 5780 6 76 72 3795 31 194 70 291 239 5800 6 73 75 3120 35 194 40 292 240 5800 5 80 65 2667 17 175 100 294 241 5780 9 73 61 5000 39 115 120 295 242 5790 8 80 60 5000 36 94 120 296 243 5770 5 75 64 308 25 204 140 297 244 5750 4 68 61 2982 18 155 120 298 245 5640 5 93 63 5000 30 115 70 299 246 5640 7 57 62 5000 25 107 150 300 247 5650 3 70 59 5000 38 87 200 301 248 5710 6 65 56 5000 35 88 200 302 249 5760 6 66 59 3070 13 156 200 303 250 5840 4 73 72 830 0 223 70 304 251 5880 3 77 71 711 -9 242 40 305 252 5890 5 80 75 1049 -10 261 50 306 253 5890 4 73 71 511 -39 288 17 307 254 5890 5 19 71 5000 -40 198 80 308 255 5890 6 19 73 5000 -34 208 250 309 256 5850 3 73 78 377 -3 260 200 310 257 5830 5 76 73 862 27 231 2 311 258 5830 8 77 71 337 -17 273 20 312 259 5860 5 86 73 492 -2 279 7 313 260 5830 5 76 71 1394 13 239 30 314 261 5800 7 66 66 3146 27 178 50 315 262 5830 4 74 69 2234 11 193 70 316 263 5790 5 71 69 2109 21 209 17 317 264 5730 4 84 64 5000 23 125 80 318 265 5780 5 74 65 2270 -7 205 50 319 266 5740 7 48 54 2191 -13 204 60 320 267 5710 8 75 62 3448 12 148 60 321 268 5690 6 74 56 5000 13 94 80 322 269 5670 4 67 55 5000 11 97 50 323 270 5760 4 75 58 2719 25 138 50 324 271 5820 5 71 48 1899 21 167 40 325 272 5790 3 35 54 5000 -41 114 40 326 273 5760 5 23 57 5000 -21 105 300 327 274 5800 6 19 60 5000 -19 124 200 328 275 5810 7 59 61 2385 10 158 150 329 276 5750 4 60 63 1938 0 170 100 330 277 5840 0 38 65 590 -11 211 100 331 278 5920 3 22 71 328 -40 270 150 333 279 5860 7 19 70 5000 -29 165 300 335 280 5840 0 45 68 597 -22 231 30 337 281 5810 2 47 69 469 -4 221 50 339 282 5770 2 73 59 1541 18 173 20 340 283 5710 4 67 49 5000 24 55 200 341 284 5500 9 56 39 5000 15 54 120 342 285 5660 3 54 50 5000 27 70 300 343 286 5700 3 71 46 5000 54 60 200 344 287 5810 5 59 54 5000 -28 120 70 345 288 5860 0 25 60 5000 -38 175 140 346 289 5900 0 24 62 5000 -36 156 150 347 290 5850 5 41 65 2014 -20 211 200 348 291 5780 3 50 66 436 1 213 4 349 292 5790 0 76 66 830 3 189 40 350 293 5780 2 82 63 1112 -8 191 30 351 294 5770 2 81 62 1210 -17 199 30 352 295 5750 2 85 60 501 -22 216 2 353 296 5780 5 76 63 875 -15 205 0 354 297 5790 5 66 60 1601 7 167 30 355 298 5750 6 58 58 5000 59 55 60 356 299 5670 8 19 34 5000 -63 28 150 357 300 5760 0 19 36 5000 -52 50 100 358 301 5770 4 19 44 2280 -54 132 250 359 302 5810 2 19 53 2047 -43 175 150 360 303 5810 2 19 52 5000 -69 136 200 361 304 5870 3 19 53 3720 -50 163 200 362 305 5830 2 27 58 311 -24 211 200 363 306 5760 0 64 55 2536 28 136 80 364 307 5680 0 52 50 1154 -22 164 60 365 308 5780 4 19 48 2933 -40 155 300 366 309 5810 3 19 51 3064 -33 171 200 367 310 5760 0 32 62 826 -16 182 300 368 311 5680 0 58 40 5000 2 61 50 369 312 5750 0 26 44 111 -52 201 40 370 313 5790 5 19 49 5000 -48 126 70 371 314 5770 3 19 53 5000 -37 131 150 372 315 5750 0 19 53 5000 -26 106 150 373 316 5720 0 19 53 5000 -31 108 70 374 317 5760 3 19 55 948 -48 215 200 375 318 5780 0 19 51 5000 -50 105 120 376 319 5660 4 19 54 5000 -22 92 150 377 320 5610 2 58 48 3687 -10 83 150 378 321 5640 0 51 53 5000 0 68 60 379 322 5680 3 52 49 5000 -19 76 70 380 323 5650 5 19 48 5000 -28 74 150 381 324 5710 4 19 51 5000 -25 91 300 382 325 5680 4 57 47 508 -10 148 100 383 326 5630 4 50 50 2851 -5 100 70 384 327 5730 3 53 51 111 -14 225 200 387 328 5690 3 23 51 5000 -36 107 70 388 329 5650 3 61 50 3704 18 83 40 389 330 5550 4 85 39 5000 8 44 100 390 vh wind humidity temp Min. :5320 Min. : 0.000 Min. :19.00 Min. :25.00 1st Qu.:5690 1st Qu.: 3.000 1st Qu.:47.00 1st Qu.:51.00 Median :5760 Median : 5.000 Median :64.00 Median :62.00 Mean :5750 Mean : 4.848 Mean :58.13 Mean :61.75 3rd Qu.:5830 3rd Qu.: 6.000 3rd Qu.:73.00 3rd Qu.:72.00 Max. :5950 Max. :11.000 Max. :93.00 Max. :93.00 ibh dpg ibt vis Min. : 111.0 Min. :-69.00 Min. :-25.0 Min. : 0.0 1st Qu.: 877.5 1st Qu.: -9.00 1st Qu.:107.0 1st Qu.: 70.0 Median :2112.5 Median : 24.00 Median :167.5 Median :120.0 Mean :2572.9 Mean : 17.37 Mean :161.2 Mean :124.5 3rd Qu.:5000.0 3rd Qu.: 44.75 3rd Qu.:214.0 3rd Qu.:150.0 Max. :5000.0 Max. :107.00 Max. :332.0 Max. :350.0 doy Min. : 33.0 1st Qu.:120.2 Median :205.5 Mean :209.4 3rd Qu.:301.8 Max. :390.0 nlevels: vh=53 wind=11 humidity=65 temp=63 ibh=196 dpg=128 ibt=193 vis=24 doy=325 --get.plotmo.y for earth object formula O3 ~ . stripped formula O3~. get.data.for.formula: using y from "ozone1" passed to earth about to eval model.frame(formula=O3~., data=structure(list(O3=c(3, 5, 5, 6, 4, 4, 6, 7, 4, 6, 5, 4, 4, 7, 5, 9, 4, 3, 4, 4, 5, 6, 9, 6, 6, 11, 10, 7, 12, 9, 2, 3, 3, 2, 3, 3, 4, 6, 8, 6, 4, 3, 7, 11, 13, 6, 5, 4, 4, 6, 10, 15, 23, 17, 7, 2, 3, 3, 4, 6, 7, 7, 6, 3, 2, 8, 12, 12, 16, 9, 24, 13, 8, 10, 8, 9, 10, 14, 9, 11, 7, 9, 12, 12, 8, 9, 5, 4, 4, 9, 13, 5, 10, 10, 7, 5, 4, 7, 3, 4, 7, 11, 15, 22, 17, 7, 10, 19, 18, 12, 6, 9, 19, 21, 29, 16, 11, 2, 12, 16, 22, 20, 27, 33, 25, 31, 18, 24, 16, 12, 9, ... got y from object$call$formula get.plotmo.y returned length 330 min 1 max 38 value 3 5 5 6 4 4 6 7 4 6 5 4 4 7 5 9 4 3 4 4 5 6 9 6 6 11 10 7 12 9 2 3 3 2 3 3 4 6 8 6 4 3 7 11 13 6 5 4 4 6 10 15 23 17 7 2 3 3 4 6 7 7 6 3 2 8 12 12 16 9 24 13 8 10 8 9 10 14 9 11 7 9 12 12 8 9 5 4 4 9 13 5 10 10 7 5 4 7 3 4 7 11 15 22 17 7 10 19 18 12 6 9 19 21 29 16 11 2 12 16 22 20 27 33 25 31 18 24 16 12 9 16 8 9 29 20 5 5 11 12 19 17 19 16 14 10 9 7 5 2 12 22 17 26 27 14 11 23 26 21 15 20 15 18 26 19 13 30 26 15 16 16 19 23 28 34 33 24 17 10 14 13 17 22 19 20 25 28 29 23 26 14 13 26 22 14 13 9 12 14 24 19 16 7 2 4 6 12 9 15 17 13 20 22 24 26 32 33 27 38 23 19 19 15 28 10 14 26 17 3 14 29 18 3 9 19 8 23 13 7 3 5 11 12 5 4 5 4 10 17 26 30 18 12 7 15 12 7 28 22 18 14 24 10 14 9 12 7 7 6 13 5 3 7 8 10 12 6 5 20 14 16 5 3 5 1 5 4 11 6 8 14 18 12 9 7 14 4 3 3 3 3 3 3 3 6 6 5 3 4 7 5 5 4 3 2 5 3 4 4 6 6 3 4 3 8 2 3 5 1 V1 Min. : 1.00 1st Qu.: 5.00 Median :10.00 Mean :11.78 3rd Qu.:17.00 Max. :38.00 clip.limits 1 38 --get.plotmo.singles for earth object singles: 4 temp, 5 ibh, 8 vis, 9 doy --get.plotmo.pairs for earth object pairs: [,1] [,2] [1,] "2 wind" "8 vis" [2,] "3 humidity" "4 temp" [3,] "4 temp" "6 dpg" --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 205.5 2 5760 5 64 26.38776 2112.5 24 167.5 120 205.5 3 5760 5 64 27.77551 2112.5 24 167.5 120 205.5 4 5760 5 64 29.16327 2112.5 24 167.5 120 205.5 5 5760 5 64 30.55102 2112.5 24 167.5 120 205.5 6 5760 5 64 31.93878 2112.5 24 167.5 120 205.5 7 5760 5 64 33.32653 2112.5 24 167.5 120 205.5 8 5760 5 64 34.71429 2112.5 24 167.5 120 205.5 9 5760 5 64 36.10204 2112.5 24 167.5 120 205.5 10 5760 5 64 37.48980 2112.5 24 167.5 120 205.5 11 5760 5 64 38.87755 2112.5 24 167.5 120 205.5 12 5760 5 64 40.26531 2112.5 24 167.5 120 205.5 13 5760 5 64 41.65306 2112.5 24 167.5 120 205.5 14 5760 5 64 43.04082 2112.5 24 167.5 120 205.5 15 5760 5 64 44.42857 2112.5 24 167.5 120 205.5 16 5760 5 64 45.81633 2112.5 24 167.5 120 205.5 17 5760 5 64 47.20408 2112.5 24 167.5 120 205.5 18 5760 5 64 48.59184 2112.5 24 167.5 120 205.5 19 5760 5 64 49.97959 2112.5 24 167.5 120 205.5 20 5760 5 64 51.36735 2112.5 24 167.5 120 205.5 21 5760 5 64 52.75510 2112.5 24 167.5 120 205.5 22 5760 5 64 54.14286 2112.5 24 167.5 120 205.5 23 5760 5 64 55.53061 2112.5 24 167.5 120 205.5 24 5760 5 64 56.91837 2112.5 24 167.5 120 205.5 25 5760 5 64 58.30612 2112.5 24 167.5 120 205.5 26 5760 5 64 59.69388 2112.5 24 167.5 120 205.5 27 5760 5 64 61.08163 2112.5 24 167.5 120 205.5 28 5760 5 64 62.46939 2112.5 24 167.5 120 205.5 29 5760 5 64 63.85714 2112.5 24 167.5 120 205.5 30 5760 5 64 65.24490 2112.5 24 167.5 120 205.5 31 5760 5 64 66.63265 2112.5 24 167.5 120 205.5 32 5760 5 64 68.02041 2112.5 24 167.5 120 205.5 33 5760 5 64 69.40816 2112.5 24 167.5 120 205.5 34 5760 5 64 70.79592 2112.5 24 167.5 120 205.5 35 5760 5 64 72.18367 2112.5 24 167.5 120 205.5 36 5760 5 64 73.57143 2112.5 24 167.5 120 205.5 37 5760 5 64 74.95918 2112.5 24 167.5 120 205.5 38 5760 5 64 76.34694 2112.5 24 167.5 120 205.5 39 5760 5 64 77.73469 2112.5 24 167.5 120 205.5 40 5760 5 64 79.12245 2112.5 24 167.5 120 205.5 41 5760 5 64 80.51020 2112.5 24 167.5 120 205.5 42 5760 5 64 81.89796 2112.5 24 167.5 120 205.5 43 5760 5 64 83.28571 2112.5 24 167.5 120 205.5 44 5760 5 64 84.67347 2112.5 24 167.5 120 205.5 45 5760 5 64 86.06122 2112.5 24 167.5 120 205.5 46 5760 5 64 87.44898 2112.5 24 167.5 120 205.5 47 5760 5 64 88.83673 2112.5 24 167.5 120 205.5 48 5760 5 64 90.22449 2112.5 24 167.5 120 205.5 49 5760 5 64 91.61224 2112.5 24 167.5 120 205.5 50 5760 5 64 93.00000 2112.5 24 167.5 120 205.5 vh wind humidity temp ibh Min. :5760 Min. :5 Min. :64 Min. :25 Min. :2112 1st Qu.:5760 1st Qu.:5 1st Qu.:64 1st Qu.:42 1st Qu.:2112 Median :5760 Median :5 Median :64 Median :59 Median :2112 Mean :5760 Mean :5 Mean :64 Mean :59 Mean :2112 3rd Qu.:5760 3rd Qu.:5 3rd Qu.:64 3rd Qu.:76 3rd Qu.:2112 Max. :5760 Max. :5 Max. :64 Max. :93 Max. :2112 dpg ibt vis doy Min. :24 Min. :167.5 Min. :120 Min. :205.5 1st Qu.:24 1st Qu.:167.5 1st Qu.:120 1st Qu.:205.5 Median :24 Median :167.5 Median :120 Median :205.5 Mean :24 Mean :167.5 Mean :120 Mean :205.5 3rd Qu.:24 3rd Qu.:167.5 3rd Qu.:120 3rd Qu.:205.5 Max. :24 Max. :167.5 Max. :120 Max. :205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 205.5 2 5760 5 64 26.38776 2112.5 24 167.5 120 205.5 3 5760 5 64 27.77551 2112.5 24 167.5 120 205.5 4 5760 5 64 29.16327 2112.5 24 167.5 120 205.5 5 5760 5 64 30.55102 2112.5 24 167.5 120 205.5 6 5760 5 64 31.93878 2112.5 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 24 167.5 120 205.5 2 5760 5 64 26.38776 2112.5 24 167.5 120 205.5 3 5760 5 64 27.77551 2112.5 24 167.5 120 205.5 4 5760 5 64 29.16327 2112.5 24 167.5 120 205.5 5 5760 5 64 30.55102 2112.5 24 167.5 120 205.5 6 5760 5 64 31.93878 2112.5 24 167.5 120 205.5 predict.earth: bx is a 50 by 15 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis) First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 0 33.00000 1043.5 0 116.5 [2,] 1 0 31.61224 1043.5 0 116.5 [3,] 1 0 30.22449 1043.5 0 116.5 [4,] 1 0 28.83673 1043.5 0 116.5 [5,] 1 0 27.44898 1043.5 0 116.5 [6,] 1 0 26.06122 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 [5,] 0 0 0 [6,] 0 0 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 0 0 80 [2,] 0 0 0 80 [3,] 0 0 0 80 [4,] 0 0 0 80 [5,] 0 0 0 80 [6,] 0 0 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) [1,] 0 160 [2,] 0 160 [3,] 0 160 [4,] 0 160 [5,] 0 160 [6,] 0 160 predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 50 min 5.18223 max 29.01646 value 5.18223 5.400442 5.618653 5.836865 6.055077 6.273288 6.4915 6.709712 6.927923 7.146135 7.364347 7.582558 7.80077 8.018982 8.237193 8.455405 8.673617 8.891828 9.11004 9.328252 9.546463 9.764675 9.982886 10.2011 10.53425 11.27354 12.01283 12.75212 13.49141 14.23069 14.96998 15.70927 16.44856 17.18785 17.92713 18.66642 19.40571 20.145 20.88429 21.62358 22.36286 23.10215 23.84144 24.58073 25.32002 26.0593 26.79859 27.53788 28.27717 29.01646 O3 Min. : 5.182 1st Qu.: 7.855 Median :10.904 Mean :13.975 3rd Qu.:19.960 Max. :29.016 plotmo.predict(type="response") for degree1 plot "ibh" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 24 167.5 120 205.5 2 5760 5 64 62 210.7755 24 167.5 120 205.5 3 5760 5 64 62 310.5510 24 167.5 120 205.5 4 5760 5 64 62 410.3265 24 167.5 120 205.5 5 5760 5 64 62 510.1020 24 167.5 120 205.5 6 5760 5 64 62 609.8776 24 167.5 120 205.5 7 5760 5 64 62 709.6531 24 167.5 120 205.5 8 5760 5 64 62 809.4286 24 167.5 120 205.5 9 5760 5 64 62 909.2041 24 167.5 120 205.5 10 5760 5 64 62 1008.9796 24 167.5 120 205.5 11 5760 5 64 62 1108.7551 24 167.5 120 205.5 12 5760 5 64 62 1208.5306 24 167.5 120 205.5 13 5760 5 64 62 1308.3061 24 167.5 120 205.5 14 5760 5 64 62 1408.0816 24 167.5 120 205.5 15 5760 5 64 62 1507.8571 24 167.5 120 205.5 16 5760 5 64 62 1607.6327 24 167.5 120 205.5 17 5760 5 64 62 1707.4082 24 167.5 120 205.5 18 5760 5 64 62 1807.1837 24 167.5 120 205.5 19 5760 5 64 62 1906.9592 24 167.5 120 205.5 20 5760 5 64 62 2006.7347 24 167.5 120 205.5 21 5760 5 64 62 2106.5102 24 167.5 120 205.5 22 5760 5 64 62 2206.2857 24 167.5 120 205.5 23 5760 5 64 62 2306.0612 24 167.5 120 205.5 24 5760 5 64 62 2405.8367 24 167.5 120 205.5 25 5760 5 64 62 2505.6122 24 167.5 120 205.5 26 5760 5 64 62 2605.3878 24 167.5 120 205.5 27 5760 5 64 62 2705.1633 24 167.5 120 205.5 28 5760 5 64 62 2804.9388 24 167.5 120 205.5 29 5760 5 64 62 2904.7143 24 167.5 120 205.5 30 5760 5 64 62 3004.4898 24 167.5 120 205.5 31 5760 5 64 62 3104.2653 24 167.5 120 205.5 32 5760 5 64 62 3204.0408 24 167.5 120 205.5 33 5760 5 64 62 3303.8163 24 167.5 120 205.5 34 5760 5 64 62 3403.5918 24 167.5 120 205.5 35 5760 5 64 62 3503.3673 24 167.5 120 205.5 36 5760 5 64 62 3603.1429 24 167.5 120 205.5 37 5760 5 64 62 3702.9184 24 167.5 120 205.5 38 5760 5 64 62 3802.6939 24 167.5 120 205.5 39 5760 5 64 62 3902.4694 24 167.5 120 205.5 40 5760 5 64 62 4002.2449 24 167.5 120 205.5 41 5760 5 64 62 4102.0204 24 167.5 120 205.5 42 5760 5 64 62 4201.7959 24 167.5 120 205.5 43 5760 5 64 62 4301.5714 24 167.5 120 205.5 44 5760 5 64 62 4401.3469 24 167.5 120 205.5 45 5760 5 64 62 4501.1224 24 167.5 120 205.5 46 5760 5 64 62 4600.8980 24 167.5 120 205.5 47 5760 5 64 62 4700.6735 24 167.5 120 205.5 48 5760 5 64 62 4800.4490 24 167.5 120 205.5 49 5760 5 64 62 4900.2245 24 167.5 120 205.5 50 5760 5 64 62 5000.0000 24 167.5 120 205.5 vh wind humidity temp ibh Min. :5760 Min. :5 Min. :64 Min. :62 Min. : 111 1st Qu.:5760 1st Qu.:5 1st Qu.:64 1st Qu.:62 1st Qu.:1333 Median :5760 Median :5 Median :64 Median :62 Median :2556 Mean :5760 Mean :5 Mean :64 Mean :62 Mean :2556 3rd Qu.:5760 3rd Qu.:5 3rd Qu.:64 3rd Qu.:62 3rd Qu.:3778 Max. :5760 Max. :5 Max. :64 Max. :62 Max. :5000 dpg ibt vis doy Min. :24 Min. :167.5 Min. :120 Min. :205.5 1st Qu.:24 1st Qu.:167.5 1st Qu.:120 1st Qu.:205.5 Median :24 Median :167.5 Median :120 Median :205.5 Mean :24 Mean :167.5 Mean :120 Mean :205.5 3rd Qu.:24 3rd Qu.:167.5 3rd Qu.:120 3rd Qu.:205.5 Max. :24 Max. :167.5 Max. :120 Max. :205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 24 167.5 120 205.5 2 5760 5 64 62 210.7755 24 167.5 120 205.5 3 5760 5 64 62 310.5510 24 167.5 120 205.5 4 5760 5 64 62 410.3265 24 167.5 120 205.5 5 5760 5 64 62 510.1020 24 167.5 120 205.5 6 5760 5 64 62 609.8776 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 111.0000 24 167.5 120 205.5 2 5760 5 64 62 210.7755 24 167.5 120 205.5 3 5760 5 64 62 310.5510 24 167.5 120 205.5 4 5760 5 64 62 410.3265 24 167.5 120 205.5 5 5760 5 64 62 510.1020 24 167.5 120 205.5 6 5760 5 64 62 609.8776 24 167.5 120 205.5 predict.earth: bx is a 50 by 15 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis) First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 0 958.0000 116.5 [2,] 1 4 0 0 858.2245 116.5 [3,] 1 4 0 0 758.4490 116.5 [4,] 1 4 0 0 658.6735 116.5 [5,] 1 4 0 0 558.8980 116.5 [6,] 1 4 0 0 459.1224 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 80 [2,] 0 120 0 80 [3,] 0 120 0 80 [4,] 0 120 0 80 [5,] 0 120 0 80 [6,] 0 120 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) [1,] 0 160 [2,] 0 160 [3,] 0 160 [4,] 0 160 [5,] 0 160 [6,] 0 160 predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 50 min 9.796532 max 13.44255 value 10.80643 11.08486 11.36329 11.64172 11.92015 12.19859 12.47702 12.75545 13.03388 13.31231 13.44255 13.34907 13.25558 13.16209 13.0686 12.97512 12.88163 12.78814 12.69465 12.60116 12.50768 12.41419 12.3207 12.22721 12.13373 12.04024 11.94675 11.85326 11.75977 11.66629 11.5728 11.47931 11.38582 11.29234 11.19885 11.10536 11.01187 10.91838 10.8249 10.73141 10.63792 10.54443 10.45095 10.35746 10.26397 10.17048 10.07699 9.983507 9.890019 9.796532 O3 Min. : 9.797 1st Qu.:10.848 Median :11.713 Mean :11.708 3rd Qu.:12.578 Max. :13.443 plotmo.predict(type="response") for degree1 plot "vis" with newdata[24,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 0 205.5 2 5760 5 64 62 2112.5 24 167.5 2 205.5 3 5760 5 64 62 2112.5 24 167.5 4 205.5 4 5760 5 64 62 2112.5 24 167.5 6 205.5 5 5760 5 64 62 2112.5 24 167.5 7 205.5 6 5760 5 64 62 2112.5 24 167.5 10 205.5 7 5760 5 64 62 2112.5 24 167.5 17 205.5 8 5760 5 64 62 2112.5 24 167.5 20 205.5 9 5760 5 64 62 2112.5 24 167.5 27 205.5 10 5760 5 64 62 2112.5 24 167.5 30 205.5 11 5760 5 64 62 2112.5 24 167.5 40 205.5 12 5760 5 64 62 2112.5 24 167.5 50 205.5 13 5760 5 64 62 2112.5 24 167.5 60 205.5 14 5760 5 64 62 2112.5 24 167.5 70 205.5 15 5760 5 64 62 2112.5 24 167.5 80 205.5 16 5760 5 64 62 2112.5 24 167.5 90 205.5 17 5760 5 64 62 2112.5 24 167.5 100 205.5 18 5760 5 64 62 2112.5 24 167.5 120 205.5 19 5760 5 64 62 2112.5 24 167.5 140 205.5 20 5760 5 64 62 2112.5 24 167.5 150 205.5 21 5760 5 64 62 2112.5 24 167.5 200 205.5 22 5760 5 64 62 2112.5 24 167.5 250 205.5 23 5760 5 64 62 2112.5 24 167.5 300 205.5 24 5760 5 64 62 2112.5 24 167.5 350 205.5 vh wind humidity temp ibh Min. :5760 Min. :5 Min. :64 Min. :62 Min. :2112 1st Qu.:5760 1st Qu.:5 1st Qu.:64 1st Qu.:62 1st Qu.:2112 Median :5760 Median :5 Median :64 Median :62 Median :2112 Mean :5760 Mean :5 Mean :64 Mean :62 Mean :2112 3rd Qu.:5760 3rd Qu.:5 3rd Qu.:64 3rd Qu.:62 3rd Qu.:2112 Max. :5760 Max. :5 Max. :64 Max. :62 Max. :2112 dpg ibt vis doy Min. :24 Min. :167.5 Min. : 0.00 Min. :205.5 1st Qu.:24 1st Qu.:167.5 1st Qu.: 15.25 1st Qu.:205.5 Median :24 Median :167.5 Median : 55.00 Median :205.5 Mean :24 Mean :167.5 Mean : 88.46 Mean :205.5 3rd Qu.:24 3rd Qu.:167.5 3rd Qu.:125.00 3rd Qu.:205.5 Max. :24 Max. :167.5 Max. :350.00 Max. :205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 24 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 0 205.5 2 5760 5 64 62 2112.5 24 167.5 2 205.5 3 5760 5 64 62 2112.5 24 167.5 4 205.5 4 5760 5 64 62 2112.5 24 167.5 6 205.5 5 5760 5 64 62 2112.5 24 167.5 7 205.5 6 5760 5 64 62 2112.5 24 167.5 10 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 24 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 0 205.5 2 5760 5 64 62 2112.5 24 167.5 2 205.5 3 5760 5 64 62 2112.5 24 167.5 4 205.5 4 5760 5 64 62 2112.5 24 167.5 6 205.5 5 5760 5 64 62 2112.5 24 167.5 7 205.5 6 5760 5 64 62 2112.5 24 167.5 10 205.5 predict.earth: bx is a 24 by 15 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis) First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 116.5 [2,] 1 4 0 1043.5 0 116.5 [3,] 1 4 0 1043.5 0 116.5 [4,] 1 4 0 1043.5 0 116.5 [5,] 1 4 0 1043.5 0 116.5 [6,] 1 4 0 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 200 [2,] 0 120 0 198 [3,] 0 120 0 196 [4,] 0 120 0 194 [5,] 0 120 0 193 [6,] 0 120 0 190 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) [1,] 0 400 [2,] 0 396 [3,] 0 392 [4,] 0 388 [5,] 0 386 [6,] 0 380 predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 24 min 10.97241 max 14.79654 value 14.79654 14.7583 14.72006 14.68182 14.6627 14.60534 14.47149 14.41413 14.28029 14.22292 14.03172 13.84051 13.6493 13.4581 13.26689 13.07568 12.88448 12.50206 12.11965 11.92844 10.97241 11.18303 11.39364 11.60426 O3 Min. :10.97 1st Qu.:12.41 Median :13.74 Mean :13.40 3rd Qu.:14.50 Max. :14.80 plotmo.predict(type="response") for degree1 plot "doy" with newdata[50,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 120 33.00000 2 5760 5 64 62 2112.5 24 167.5 120 40.28571 3 5760 5 64 62 2112.5 24 167.5 120 47.57143 4 5760 5 64 62 2112.5 24 167.5 120 54.85714 5 5760 5 64 62 2112.5 24 167.5 120 62.14286 6 5760 5 64 62 2112.5 24 167.5 120 69.42857 7 5760 5 64 62 2112.5 24 167.5 120 76.71429 8 5760 5 64 62 2112.5 24 167.5 120 84.00000 9 5760 5 64 62 2112.5 24 167.5 120 91.28571 10 5760 5 64 62 2112.5 24 167.5 120 98.57143 11 5760 5 64 62 2112.5 24 167.5 120 105.85714 12 5760 5 64 62 2112.5 24 167.5 120 113.14286 13 5760 5 64 62 2112.5 24 167.5 120 120.42857 14 5760 5 64 62 2112.5 24 167.5 120 127.71429 15 5760 5 64 62 2112.5 24 167.5 120 135.00000 16 5760 5 64 62 2112.5 24 167.5 120 142.28571 17 5760 5 64 62 2112.5 24 167.5 120 149.57143 18 5760 5 64 62 2112.5 24 167.5 120 156.85714 19 5760 5 64 62 2112.5 24 167.5 120 164.14286 20 5760 5 64 62 2112.5 24 167.5 120 171.42857 21 5760 5 64 62 2112.5 24 167.5 120 178.71429 22 5760 5 64 62 2112.5 24 167.5 120 186.00000 23 5760 5 64 62 2112.5 24 167.5 120 193.28571 24 5760 5 64 62 2112.5 24 167.5 120 200.57143 25 5760 5 64 62 2112.5 24 167.5 120 207.85714 26 5760 5 64 62 2112.5 24 167.5 120 215.14286 27 5760 5 64 62 2112.5 24 167.5 120 222.42857 28 5760 5 64 62 2112.5 24 167.5 120 229.71429 29 5760 5 64 62 2112.5 24 167.5 120 237.00000 30 5760 5 64 62 2112.5 24 167.5 120 244.28571 31 5760 5 64 62 2112.5 24 167.5 120 251.57143 32 5760 5 64 62 2112.5 24 167.5 120 258.85714 33 5760 5 64 62 2112.5 24 167.5 120 266.14286 34 5760 5 64 62 2112.5 24 167.5 120 273.42857 35 5760 5 64 62 2112.5 24 167.5 120 280.71429 36 5760 5 64 62 2112.5 24 167.5 120 288.00000 37 5760 5 64 62 2112.5 24 167.5 120 295.28571 38 5760 5 64 62 2112.5 24 167.5 120 302.57143 39 5760 5 64 62 2112.5 24 167.5 120 309.85714 40 5760 5 64 62 2112.5 24 167.5 120 317.14286 41 5760 5 64 62 2112.5 24 167.5 120 324.42857 42 5760 5 64 62 2112.5 24 167.5 120 331.71429 43 5760 5 64 62 2112.5 24 167.5 120 339.00000 44 5760 5 64 62 2112.5 24 167.5 120 346.28571 45 5760 5 64 62 2112.5 24 167.5 120 353.57143 46 5760 5 64 62 2112.5 24 167.5 120 360.85714 47 5760 5 64 62 2112.5 24 167.5 120 368.14286 48 5760 5 64 62 2112.5 24 167.5 120 375.42857 49 5760 5 64 62 2112.5 24 167.5 120 382.71429 50 5760 5 64 62 2112.5 24 167.5 120 390.00000 vh wind humidity temp ibh Min. :5760 Min. :5 Min. :64 Min. :62 Min. :2112 1st Qu.:5760 1st Qu.:5 1st Qu.:64 1st Qu.:62 1st Qu.:2112 Median :5760 Median :5 Median :64 Median :62 Median :2112 Mean :5760 Mean :5 Mean :64 Mean :62 Mean :2112 3rd Qu.:5760 3rd Qu.:5 3rd Qu.:64 3rd Qu.:62 3rd Qu.:2112 Max. :5760 Max. :5 Max. :64 Max. :62 Max. :2112 dpg ibt vis doy Min. :24 Min. :167.5 Min. :120 Min. : 33.0 1st Qu.:24 1st Qu.:167.5 1st Qu.:120 1st Qu.:122.2 Median :24 Median :167.5 Median :120 Median :211.5 Mean :24 Mean :167.5 Mean :120 Mean :211.5 3rd Qu.:24 3rd Qu.:167.5 3rd Qu.:120 3rd Qu.:300.8 Max. :24 Max. :167.5 Max. :120 Max. :390.0 get.earth.x from model.matrix.earth from predict.earth: x is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 120 33.00000 2 5760 5 64 62 2112.5 24 167.5 120 40.28571 3 5760 5 64 62 2112.5 24 167.5 120 47.57143 4 5760 5 64 62 2112.5 24 167.5 120 54.85714 5 5760 5 64 62 2112.5 24 167.5 120 62.14286 6 5760 5 64 62 2112.5 24 167.5 120 69.42857 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 50 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 62 2112.5 24 167.5 120 33.00000 2 5760 5 64 62 2112.5 24 167.5 120 40.28571 3 5760 5 64 62 2112.5 24 167.5 120 47.57143 4 5760 5 64 62 2112.5 24 167.5 120 54.85714 5 5760 5 64 62 2112.5 24 167.5 120 62.14286 6 5760 5 64 62 2112.5 24 167.5 120 69.42857 predict.earth: bx is a 50 by 15 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis) First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 0 [2,] 1 4 0 1043.5 0 0 [3,] 1 4 0 1043.5 0 0 [4,] 1 4 0 1043.5 0 0 [5,] 1 4 0 1043.5 0 0 [6,] 1 4 0 1043.5 0 0 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 56.00000 32 0 [2,] 48.71429 32 0 [3,] 41.42857 32 0 [4,] 34.14286 32 0 [5,] 26.85714 32 0 [6,] 19.57143 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 80 [2,] 0 120 0 80 [3,] 0 120 0 80 [4,] 0 120 0 80 [5,] 0 120 0 80 [6,] 0 120 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) [1,] 0 160 [2,] 0 160 [3,] 0 160 [4,] 0 160 [5,] 0 160 [6,] 0 160 predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 50 min 7.619508 max 14.6546 value 7.619508 8.540393 9.461278 10.38216 11.30305 12.22393 13.14482 14.0657 14.6546 14.51729 14.37998 14.24267 14.10536 13.96805 13.83074 13.69343 13.55612 13.41881 13.2815 13.14419 13.00688 12.86957 12.73226 12.59495 12.45764 12.32033 12.18302 12.04571 11.9084 11.77109 11.63378 11.49647 11.35916 11.22185 11.08454 10.94723 10.80992 10.67261 10.5353 10.39799 10.26068 10.12337 9.986057 9.848746 9.711436 9.574126 9.436816 9.299506 9.162195 9.024885 O3 Min. : 7.62 1st Qu.:10.29 Median :11.70 Mean :11.68 3rd Qu.:13.14 Max. :14.65 --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "wind:vis" with newdata[220,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 167.5 0.00000 205.5 2 5760 2 64 62 2112.5 24 167.5 0.00000 205.5 3 5760 3 64 62 2112.5 24 167.5 0.00000 205.5 4 5760 4 64 62 2112.5 24 167.5 0.00000 205.5 5 5760 5 64 62 2112.5 24 167.5 0.00000 205.5 6 5760 6 64 62 2112.5 24 167.5 0.00000 205.5 7 5760 7 64 62 2112.5 24 167.5 0.00000 205.5 8 5760 8 64 62 2112.5 24 167.5 0.00000 205.5 9 5760 9 64 62 2112.5 24 167.5 0.00000 205.5 10 5760 10 64 62 2112.5 24 167.5 0.00000 205.5 11 5760 11 64 62 2112.5 24 167.5 0.00000 205.5 12 5760 0 64 62 2112.5 24 167.5 18.42105 205.5 13 5760 2 64 62 2112.5 24 167.5 18.42105 205.5 14 5760 3 64 62 2112.5 24 167.5 18.42105 205.5 15 5760 4 64 62 2112.5 24 167.5 18.42105 205.5 16 5760 5 64 62 2112.5 24 167.5 18.42105 205.5 17 5760 6 64 62 2112.5 24 167.5 18.42105 205.5 18 5760 7 64 62 2112.5 24 167.5 18.42105 205.5 19 5760 8 64 62 2112.5 24 167.5 18.42105 205.5 20 5760 9 64 62 2112.5 24 167.5 18.42105 205.5 21 5760 10 64 62 2112.5 24 167.5 18.42105 205.5 22 5760 11 64 62 2112.5 24 167.5 18.42105 205.5 23 5760 0 64 62 2112.5 24 167.5 36.84211 205.5 24 5760 2 64 62 2112.5 24 167.5 36.84211 205.5 25 5760 3 64 62 2112.5 24 167.5 36.84211 205.5 26 5760 4 64 62 2112.5 24 167.5 36.84211 205.5 27 5760 5 64 62 2112.5 24 167.5 36.84211 205.5 28 5760 6 64 62 2112.5 24 167.5 36.84211 205.5 29 5760 7 64 62 2112.5 24 167.5 36.84211 205.5 30 5760 8 64 62 2112.5 24 167.5 36.84211 205.5 31 5760 9 64 62 2112.5 24 167.5 36.84211 205.5 32 5760 10 64 62 2112.5 24 167.5 36.84211 205.5 33 5760 11 64 62 2112.5 24 167.5 36.84211 205.5 34 5760 0 64 62 2112.5 24 167.5 55.26316 205.5 35 5760 2 64 62 2112.5 24 167.5 55.26316 205.5 36 5760 3 64 62 2112.5 24 167.5 55.26316 205.5 37 5760 4 64 62 2112.5 24 167.5 55.26316 205.5 38 5760 5 64 62 2112.5 24 167.5 55.26316 205.5 39 5760 6 64 62 2112.5 24 167.5 55.26316 205.5 40 5760 7 64 62 2112.5 24 167.5 55.26316 205.5 41 5760 8 64 62 2112.5 24 167.5 55.26316 205.5 42 5760 9 64 62 2112.5 24 167.5 55.26316 205.5 43 5760 10 64 62 2112.5 24 167.5 55.26316 205.5 44 5760 11 64 62 2112.5 24 167.5 55.26316 205.5 45 5760 0 64 62 2112.5 24 167.5 73.68421 205.5 46 5760 2 64 62 2112.5 24 167.5 73.68421 205.5 47 5760 3 64 62 2112.5 24 167.5 73.68421 205.5 48 5760 4 64 62 2112.5 24 167.5 73.68421 205.5 49 5760 5 64 62 2112.5 24 167.5 73.68421 205.5 50 5760 6 64 62 2112.5 24 167.5 73.68421 205.5 51 5760 7 64 62 2112.5 24 167.5 73.68421 205.5 52 5760 8 64 62 2112.5 24 167.5 73.68421 205.5 53 5760 9 64 62 2112.5 24 167.5 73.68421 205.5 54 5760 10 64 62 2112.5 24 167.5 73.68421 205.5 55 5760 11 64 62 2112.5 24 167.5 73.68421 205.5 56 5760 0 64 62 2112.5 24 167.5 92.10526 205.5 57 5760 2 64 62 2112.5 24 167.5 92.10526 205.5 58 5760 3 64 62 2112.5 24 167.5 92.10526 205.5 59 5760 4 64 62 2112.5 24 167.5 92.10526 205.5 60 5760 5 64 62 2112.5 24 167.5 92.10526 205.5 61 5760 6 64 62 2112.5 24 167.5 92.10526 205.5 62 5760 7 64 62 2112.5 24 167.5 92.10526 205.5 63 5760 8 64 62 2112.5 24 167.5 92.10526 205.5 64 5760 9 64 62 2112.5 24 167.5 92.10526 205.5 65 5760 10 64 62 2112.5 24 167.5 92.10526 205.5 66 5760 11 64 62 2112.5 24 167.5 92.10526 205.5 67 5760 0 64 62 2112.5 24 167.5 110.52632 205.5 68 5760 2 64 62 2112.5 24 167.5 110.52632 205.5 69 5760 3 64 62 2112.5 24 167.5 110.52632 205.5 70 5760 4 64 62 2112.5 24 167.5 110.52632 205.5 71 5760 5 64 62 2112.5 24 167.5 110.52632 205.5 72 5760 6 64 62 2112.5 24 167.5 110.52632 205.5 73 5760 7 64 62 2112.5 24 167.5 110.52632 205.5 74 5760 8 64 62 2112.5 24 167.5 110.52632 205.5 75 5760 9 64 62 2112.5 24 167.5 110.52632 205.5 76 5760 10 64 62 2112.5 24 167.5 110.52632 205.5 77 5760 11 64 62 2112.5 24 167.5 110.52632 205.5 78 5760 0 64 62 2112.5 24 167.5 128.94737 205.5 79 5760 2 64 62 2112.5 24 167.5 128.94737 205.5 80 5760 3 64 62 2112.5 24 167.5 128.94737 205.5 81 5760 4 64 62 2112.5 24 167.5 128.94737 205.5 82 5760 5 64 62 2112.5 24 167.5 128.94737 205.5 83 5760 6 64 62 2112.5 24 167.5 128.94737 205.5 84 5760 7 64 62 2112.5 24 167.5 128.94737 205.5 85 5760 8 64 62 2112.5 24 167.5 128.94737 205.5 86 5760 9 64 62 2112.5 24 167.5 128.94737 205.5 87 5760 10 64 62 2112.5 24 167.5 128.94737 205.5 88 5760 11 64 62 2112.5 24 167.5 128.94737 205.5 89 5760 0 64 62 2112.5 24 167.5 147.36842 205.5 90 5760 2 64 62 2112.5 24 167.5 147.36842 205.5 91 5760 3 64 62 2112.5 24 167.5 147.36842 205.5 92 5760 4 64 62 2112.5 24 167.5 147.36842 205.5 93 5760 5 64 62 2112.5 24 167.5 147.36842 205.5 94 5760 6 64 62 2112.5 24 167.5 147.36842 205.5 95 5760 7 64 62 2112.5 24 167.5 147.36842 205.5 96 5760 8 64 62 2112.5 24 167.5 147.36842 205.5 97 5760 9 64 62 2112.5 24 167.5 147.36842 205.5 98 5760 10 64 62 2112.5 24 167.5 147.36842 205.5 99 5760 11 64 62 2112.5 24 167.5 147.36842 205.5 100 5760 0 64 62 2112.5 24 167.5 165.78947 205.5 101 5760 2 64 62 2112.5 24 167.5 165.78947 205.5 102 5760 3 64 62 2112.5 24 167.5 165.78947 205.5 103 5760 4 64 62 2112.5 24 167.5 165.78947 205.5 104 5760 5 64 62 2112.5 24 167.5 165.78947 205.5 105 5760 6 64 62 2112.5 24 167.5 165.78947 205.5 106 5760 7 64 62 2112.5 24 167.5 165.78947 205.5 107 5760 8 64 62 2112.5 24 167.5 165.78947 205.5 108 5760 9 64 62 2112.5 24 167.5 165.78947 205.5 109 5760 10 64 62 2112.5 24 167.5 165.78947 205.5 110 5760 11 64 62 2112.5 24 167.5 165.78947 205.5 111 5760 0 64 62 2112.5 24 167.5 184.21053 205.5 112 5760 2 64 62 2112.5 24 167.5 184.21053 205.5 113 5760 3 64 62 2112.5 24 167.5 184.21053 205.5 114 5760 4 64 62 2112.5 24 167.5 184.21053 205.5 115 5760 5 64 62 2112.5 24 167.5 184.21053 205.5 116 5760 6 64 62 2112.5 24 167.5 184.21053 205.5 117 5760 7 64 62 2112.5 24 167.5 184.21053 205.5 118 5760 8 64 62 2112.5 24 167.5 184.21053 205.5 119 5760 9 64 62 2112.5 24 167.5 184.21053 205.5 120 5760 10 64 62 2112.5 24 167.5 184.21053 205.5 121 5760 11 64 62 2112.5 24 167.5 184.21053 205.5 122 5760 0 64 62 2112.5 24 167.5 202.63158 205.5 123 5760 2 64 62 2112.5 24 167.5 202.63158 205.5 124 5760 3 64 62 2112.5 24 167.5 202.63158 205.5 125 5760 4 64 62 2112.5 24 167.5 202.63158 205.5 126 5760 5 64 62 2112.5 24 167.5 202.63158 205.5 127 5760 6 64 62 2112.5 24 167.5 202.63158 205.5 128 5760 7 64 62 2112.5 24 167.5 202.63158 205.5 129 5760 8 64 62 2112.5 24 167.5 202.63158 205.5 130 5760 9 64 62 2112.5 24 167.5 202.63158 205.5 131 5760 10 64 62 2112.5 24 167.5 202.63158 205.5 132 5760 11 64 62 2112.5 24 167.5 202.63158 205.5 133 5760 0 64 62 2112.5 24 167.5 221.05263 205.5 134 5760 2 64 62 2112.5 24 167.5 221.05263 205.5 135 5760 3 64 62 2112.5 24 167.5 221.05263 205.5 136 5760 4 64 62 2112.5 24 167.5 221.05263 205.5 137 5760 5 64 62 2112.5 24 167.5 221.05263 205.5 138 5760 6 64 62 2112.5 24 167.5 221.05263 205.5 139 5760 7 64 62 2112.5 24 167.5 221.05263 205.5 140 5760 8 64 62 2112.5 24 167.5 221.05263 205.5 141 5760 9 64 62 2112.5 24 167.5 221.05263 205.5 142 5760 10 64 62 2112.5 24 167.5 221.05263 205.5 143 5760 11 64 62 2112.5 24 167.5 221.05263 205.5 144 5760 0 64 62 2112.5 24 167.5 239.47368 205.5 145 5760 2 64 62 2112.5 24 167.5 239.47368 205.5 146 5760 3 64 62 2112.5 24 167.5 239.47368 205.5 147 5760 4 64 62 2112.5 24 167.5 239.47368 205.5 148 5760 5 64 62 2112.5 24 167.5 239.47368 205.5 149 5760 6 64 62 2112.5 24 167.5 239.47368 205.5 150 5760 7 64 62 2112.5 24 167.5 239.47368 205.5 151 5760 8 64 62 2112.5 24 167.5 239.47368 205.5 152 5760 9 64 62 2112.5 24 167.5 239.47368 205.5 153 5760 10 64 62 2112.5 24 167.5 239.47368 205.5 154 5760 11 64 62 2112.5 24 167.5 239.47368 205.5 155 5760 0 64 62 2112.5 24 167.5 257.89474 205.5 156 5760 2 64 62 2112.5 24 167.5 257.89474 205.5 157 5760 3 64 62 2112.5 24 167.5 257.89474 205.5 158 5760 4 64 62 2112.5 24 167.5 257.89474 205.5 159 5760 5 64 62 2112.5 24 167.5 257.89474 205.5 160 5760 6 64 62 2112.5 24 167.5 257.89474 205.5 161 5760 7 64 62 2112.5 24 167.5 257.89474 205.5 162 5760 8 64 62 2112.5 24 167.5 257.89474 205.5 163 5760 9 64 62 2112.5 24 167.5 257.89474 205.5 164 5760 10 64 62 2112.5 24 167.5 257.89474 205.5 165 5760 11 64 62 2112.5 24 167.5 257.89474 205.5 166 5760 0 64 62 2112.5 24 167.5 276.31579 205.5 167 5760 2 64 62 2112.5 24 167.5 276.31579 205.5 168 5760 3 64 62 2112.5 24 167.5 276.31579 205.5 169 5760 4 64 62 2112.5 24 167.5 276.31579 205.5 170 5760 5 64 62 2112.5 24 167.5 276.31579 205.5 171 5760 6 64 62 2112.5 24 167.5 276.31579 205.5 172 5760 7 64 62 2112.5 24 167.5 276.31579 205.5 173 5760 8 64 62 2112.5 24 167.5 276.31579 205.5 174 5760 9 64 62 2112.5 24 167.5 276.31579 205.5 175 5760 10 64 62 2112.5 24 167.5 276.31579 205.5 176 5760 11 64 62 2112.5 24 167.5 276.31579 205.5 177 5760 0 64 62 2112.5 24 167.5 294.73684 205.5 178 5760 2 64 62 2112.5 24 167.5 294.73684 205.5 179 5760 3 64 62 2112.5 24 167.5 294.73684 205.5 180 5760 4 64 62 2112.5 24 167.5 294.73684 205.5 181 5760 5 64 62 2112.5 24 167.5 294.73684 205.5 182 5760 6 64 62 2112.5 24 167.5 294.73684 205.5 183 5760 7 64 62 2112.5 24 167.5 294.73684 205.5 184 5760 8 64 62 2112.5 24 167.5 294.73684 205.5 185 5760 9 64 62 2112.5 24 167.5 294.73684 205.5 186 5760 10 64 62 2112.5 24 167.5 294.73684 205.5 187 5760 11 64 62 2112.5 24 167.5 294.73684 205.5 188 5760 0 64 62 2112.5 24 167.5 313.15789 205.5 189 5760 2 64 62 2112.5 24 167.5 313.15789 205.5 190 5760 3 64 62 2112.5 24 167.5 313.15789 205.5 191 5760 4 64 62 2112.5 24 167.5 313.15789 205.5 192 5760 5 64 62 2112.5 24 167.5 313.15789 205.5 193 5760 6 64 62 2112.5 24 167.5 313.15789 205.5 194 5760 7 64 62 2112.5 24 167.5 313.15789 205.5 195 5760 8 64 62 2112.5 24 167.5 313.15789 205.5 196 5760 9 64 62 2112.5 24 167.5 313.15789 205.5 197 5760 10 64 62 2112.5 24 167.5 313.15789 205.5 198 5760 11 64 62 2112.5 24 167.5 313.15789 205.5 199 5760 0 64 62 2112.5 24 167.5 331.57895 205.5 200 5760 2 64 62 2112.5 24 167.5 331.57895 205.5 201 5760 3 64 62 2112.5 24 167.5 331.57895 205.5 202 5760 4 64 62 2112.5 24 167.5 331.57895 205.5 203 5760 5 64 62 2112.5 24 167.5 331.57895 205.5 204 5760 6 64 62 2112.5 24 167.5 331.57895 205.5 205 5760 7 64 62 2112.5 24 167.5 331.57895 205.5 206 5760 8 64 62 2112.5 24 167.5 331.57895 205.5 207 5760 9 64 62 2112.5 24 167.5 331.57895 205.5 208 5760 10 64 62 2112.5 24 167.5 331.57895 205.5 209 5760 11 64 62 2112.5 24 167.5 331.57895 205.5 210 5760 0 64 62 2112.5 24 167.5 350.00000 205.5 211 5760 2 64 62 2112.5 24 167.5 350.00000 205.5 212 5760 3 64 62 2112.5 24 167.5 350.00000 205.5 213 5760 4 64 62 2112.5 24 167.5 350.00000 205.5 214 5760 5 64 62 2112.5 24 167.5 350.00000 205.5 215 5760 6 64 62 2112.5 24 167.5 350.00000 205.5 216 5760 7 64 62 2112.5 24 167.5 350.00000 205.5 217 5760 8 64 62 2112.5 24 167.5 350.00000 205.5 218 5760 9 64 62 2112.5 24 167.5 350.00000 205.5 219 5760 10 64 62 2112.5 24 167.5 350.00000 205.5 220 5760 11 64 62 2112.5 24 167.5 350.00000 205.5 vh wind humidity temp ibh Min. :5760 Min. : 0.000 Min. :64 Min. :62 Min. :2112 1st Qu.:5760 1st Qu.: 3.000 1st Qu.:64 1st Qu.:62 1st Qu.:2112 Median :5760 Median : 6.000 Median :64 Median :62 Median :2112 Mean :5760 Mean : 5.909 Mean :64 Mean :62 Mean :2112 3rd Qu.:5760 3rd Qu.: 9.000 3rd Qu.:64 3rd Qu.:62 3rd Qu.:2112 Max. :5760 Max. :11.000 Max. :64 Max. :62 Max. :2112 dpg ibt vis doy Min. :24 Min. :167.5 Min. : 0.0 Min. :205.5 1st Qu.:24 1st Qu.:167.5 1st Qu.: 87.5 1st Qu.:205.5 Median :24 Median :167.5 Median :175.0 Median :205.5 Mean :24 Mean :167.5 Mean :175.0 Mean :205.5 3rd Qu.:24 3rd Qu.:167.5 3rd Qu.:262.5 3rd Qu.:205.5 Max. :24 Max. :167.5 Max. :350.0 Max. :205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 220 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 167.5 0 205.5 2 5760 2 64 62 2112.5 24 167.5 0 205.5 3 5760 3 64 62 2112.5 24 167.5 0 205.5 4 5760 4 64 62 2112.5 24 167.5 0 205.5 5 5760 5 64 62 2112.5 24 167.5 0 205.5 6 5760 6 64 62 2112.5 24 167.5 0 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 220 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 0 64 62 2112.5 24 167.5 0 205.5 2 5760 2 64 62 2112.5 24 167.5 0 205.5 3 5760 3 64 62 2112.5 24 167.5 0 205.5 4 5760 4 64 62 2112.5 24 167.5 0 205.5 5 5760 5 64 62 2112.5 24 167.5 0 205.5 6 5760 6 64 62 2112.5 24 167.5 0 205.5 predict.earth: bx is a 220 by 15 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis) First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 4 0 1043.5 0 116.5 [2,] 1 4 0 1043.5 0 116.5 [3,] 1 4 0 1043.5 0 116.5 [4,] 1 4 0 1043.5 0 116.5 [5,] 1 4 0 1043.5 0 116.5 [6,] 1 4 0 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 32 0 [2,] 0 32 0 [3,] 0 32 0 [4,] 0 32 0 [5,] 0 32 0 [6,] 0 32 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 120 0 200 [2,] 0 120 0 200 [3,] 0 120 0 200 [4,] 0 120 0 200 [5,] 0 120 0 200 [6,] 0 120 0 200 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) [1,] 0 1400 [2,] 0 1000 [3,] 0 800 [4,] 0 600 [5,] 0 400 [6,] 0 200 predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 220 min 0.3358344 max 16.06078 value 16.06078 15.55508 15.30224 15.04939 14.79654 14.5437 14.29085 10.8021 7.313342 3.824588 0.3358344 15.59211 15.133 14.90344 14.67388 14.44432 14.21476 13.9852 10.81778 7.650362 4.48294 1.315519 15.12345 14.71091 14.50464 14.29837 14.0921 13.88583 13.67956 10.83347 7.987381 5.141293 2.295204 14.65478 14.28882 14.10584 13.92286 13.73988 13.55689 13.37391 10.84916 8.324401 5.799645 3.274888 14.18612 13.86673 13.70704 13.54735 13.38765 13.22796 13.06827 10.86484 8.66142 6.457997 4.254573 13.71745 13.44464 13.30824 13.17183 13.03543 12.89903 12.76262 10.88053 8.99844 7.116349 5.234258 13.24879 13.02255 12.90944 12.79632 12.68321 12.57009 12.45698 10.89622 9.335459 7.774701 6.213943 12.78012 12.60047 12.51064 12.42081 12.33098 12.24116 12.15133 10.9119 9.672479 8.433053 7.193627 12.31145 12.17838 12.11184 12.0453 11.97876 11.91222 11.84568 10.92759 10.0095 9.091405 8.173312 11.84279 11.75629 11.71304 11.66979 11.62654 11.58329 11.54004 10.94328 10.34652 9.749757 9.152997 11.37412 11.3342 11.31424 11.29428 11.27432 11.25435 11.23439 10.95897 10.68354 10.40811 10.13268 10.9835 10.9835 10.9835 10.9835 10.9835 10.9835 10.9835 10.9835 10.9835 10.9835 10.9835 11.06109 11.06109 11.06109 11.06109 11.06109 11.06109 11.06109 11.06109 11.06109 11.06109 11.06109 11.13869 11.13869 11.13869 11.13869 11.13869 11.13869 11.13869 11.13869 11.13869 11.13869 11.13869 11.21628 11.21628 11.21628 11.21628 11.21628 11.21628 11.21628 11.21628 11.21628 11.21628 11.21628 11.29388 11.29388 11.29388 11.29388 11.29388 11.29388 11.29388 11.29388 11.29388 11.29388 11.29388 11.37147 11.37147 11.37147 11.37147 11.37147 11.37147 11.37147 11.37147 11.37147 11.37147 11.37147 11.44907 11.44907 11.44907 11.44907 11.44907 11.44907 11.44907 11.44907 11.44907 11.44907 11.44907 11.52666 11.52666 11.52666 11.52666 11.52666 11.52666 11.52666 11.52666 11.52666 11.52666 11.52666 11.60426 11.60426 11.60426 11.60426 11.60426 11.60426 11.60426 11.60426 11.60426 11.60426 11.60426 O3 Min. : 0.3358 1st Qu.:11.0417 Median :11.3715 Mean :11.3107 3rd Qu.:12.2587 Max. :16.0608 plotmo.predict(type="response") for degree2 plot "humidity:temp" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 19.00000 25.00000 2112.5 24 167.5 120 205.5 2 5760 5 22.89474 25.00000 2112.5 24 167.5 120 205.5 3 5760 5 26.78947 25.00000 2112.5 24 167.5 120 205.5 4 5760 5 30.68421 25.00000 2112.5 24 167.5 120 205.5 5 5760 5 34.57895 25.00000 2112.5 24 167.5 120 205.5 6 5760 5 38.47368 25.00000 2112.5 24 167.5 120 205.5 7 5760 5 42.36842 25.00000 2112.5 24 167.5 120 205.5 8 5760 5 46.26316 25.00000 2112.5 24 167.5 120 205.5 9 5760 5 50.15789 25.00000 2112.5 24 167.5 120 205.5 10 5760 5 54.05263 25.00000 2112.5 24 167.5 120 205.5 11 5760 5 57.94737 25.00000 2112.5 24 167.5 120 205.5 12 5760 5 61.84211 25.00000 2112.5 24 167.5 120 205.5 13 5760 5 65.73684 25.00000 2112.5 24 167.5 120 205.5 14 5760 5 69.63158 25.00000 2112.5 24 167.5 120 205.5 15 5760 5 73.52632 25.00000 2112.5 24 167.5 120 205.5 16 5760 5 77.42105 25.00000 2112.5 24 167.5 120 205.5 17 5760 5 81.31579 25.00000 2112.5 24 167.5 120 205.5 18 5760 5 85.21053 25.00000 2112.5 24 167.5 120 205.5 19 5760 5 89.10526 25.00000 2112.5 24 167.5 120 205.5 20 5760 5 93.00000 25.00000 2112.5 24 167.5 120 205.5 21 5760 5 19.00000 28.57895 2112.5 24 167.5 120 205.5 22 5760 5 22.89474 28.57895 2112.5 24 167.5 120 205.5 23 5760 5 26.78947 28.57895 2112.5 24 167.5 120 205.5 24 5760 5 30.68421 28.57895 2112.5 24 167.5 120 205.5 25 5760 5 34.57895 28.57895 2112.5 24 167.5 120 205.5 26 5760 5 38.47368 28.57895 2112.5 24 167.5 120 205.5 27 5760 5 42.36842 28.57895 2112.5 24 167.5 120 205.5 28 5760 5 46.26316 28.57895 2112.5 24 167.5 120 205.5 29 5760 5 50.15789 28.57895 2112.5 24 167.5 120 205.5 30 5760 5 54.05263 28.57895 2112.5 24 167.5 120 205.5 31 5760 5 57.94737 28.57895 2112.5 24 167.5 120 205.5 32 5760 5 61.84211 28.57895 2112.5 24 167.5 120 205.5 33 5760 5 65.73684 28.57895 2112.5 24 167.5 120 205.5 34 5760 5 69.63158 28.57895 2112.5 24 167.5 120 205.5 35 5760 5 73.52632 28.57895 2112.5 24 167.5 120 205.5 36 5760 5 77.42105 28.57895 2112.5 24 167.5 120 205.5 37 5760 5 81.31579 28.57895 2112.5 24 167.5 120 205.5 38 5760 5 85.21053 28.57895 2112.5 24 167.5 120 205.5 39 5760 5 89.10526 28.57895 2112.5 24 167.5 120 205.5 40 5760 5 93.00000 28.57895 2112.5 24 167.5 120 205.5 41 5760 5 19.00000 32.15789 2112.5 24 167.5 120 205.5 42 5760 5 22.89474 32.15789 2112.5 24 167.5 120 205.5 43 5760 5 26.78947 32.15789 2112.5 24 167.5 120 205.5 44 5760 5 30.68421 32.15789 2112.5 24 167.5 120 205.5 45 5760 5 34.57895 32.15789 2112.5 24 167.5 120 205.5 46 5760 5 38.47368 32.15789 2112.5 24 167.5 120 205.5 47 5760 5 42.36842 32.15789 2112.5 24 167.5 120 205.5 48 5760 5 46.26316 32.15789 2112.5 24 167.5 120 205.5 49 5760 5 50.15789 32.15789 2112.5 24 167.5 120 205.5 50 5760 5 54.05263 32.15789 2112.5 24 167.5 120 205.5 51 5760 5 57.94737 32.15789 2112.5 24 167.5 120 205.5 52 5760 5 61.84211 32.15789 2112.5 24 167.5 120 205.5 53 5760 5 65.73684 32.15789 2112.5 24 167.5 120 205.5 54 5760 5 69.63158 32.15789 2112.5 24 167.5 120 205.5 55 5760 5 73.52632 32.15789 2112.5 24 167.5 120 205.5 56 5760 5 77.42105 32.15789 2112.5 24 167.5 120 205.5 57 5760 5 81.31579 32.15789 2112.5 24 167.5 120 205.5 58 5760 5 85.21053 32.15789 2112.5 24 167.5 120 205.5 59 5760 5 89.10526 32.15789 2112.5 24 167.5 120 205.5 60 5760 5 93.00000 32.15789 2112.5 24 167.5 120 205.5 61 5760 5 19.00000 35.73684 2112.5 24 167.5 120 205.5 62 5760 5 22.89474 35.73684 2112.5 24 167.5 120 205.5 63 5760 5 26.78947 35.73684 2112.5 24 167.5 120 205.5 64 5760 5 30.68421 35.73684 2112.5 24 167.5 120 205.5 65 5760 5 34.57895 35.73684 2112.5 24 167.5 120 205.5 66 5760 5 38.47368 35.73684 2112.5 24 167.5 120 205.5 67 5760 5 42.36842 35.73684 2112.5 24 167.5 120 205.5 68 5760 5 46.26316 35.73684 2112.5 24 167.5 120 205.5 69 5760 5 50.15789 35.73684 2112.5 24 167.5 120 205.5 70 5760 5 54.05263 35.73684 2112.5 24 167.5 120 205.5 71 5760 5 57.94737 35.73684 2112.5 24 167.5 120 205.5 72 5760 5 61.84211 35.73684 2112.5 24 167.5 120 205.5 73 5760 5 65.73684 35.73684 2112.5 24 167.5 120 205.5 74 5760 5 69.63158 35.73684 2112.5 24 167.5 120 205.5 75 5760 5 73.52632 35.73684 2112.5 24 167.5 120 205.5 76 5760 5 77.42105 35.73684 2112.5 24 167.5 120 205.5 77 5760 5 81.31579 35.73684 2112.5 24 167.5 120 205.5 78 5760 5 85.21053 35.73684 2112.5 24 167.5 120 205.5 79 5760 5 89.10526 35.73684 2112.5 24 167.5 120 205.5 80 5760 5 93.00000 35.73684 2112.5 24 167.5 120 205.5 81 5760 5 19.00000 39.31579 2112.5 24 167.5 120 205.5 82 5760 5 22.89474 39.31579 2112.5 24 167.5 120 205.5 83 5760 5 26.78947 39.31579 2112.5 24 167.5 120 205.5 84 5760 5 30.68421 39.31579 2112.5 24 167.5 120 205.5 85 5760 5 34.57895 39.31579 2112.5 24 167.5 120 205.5 86 5760 5 38.47368 39.31579 2112.5 24 167.5 120 205.5 87 5760 5 42.36842 39.31579 2112.5 24 167.5 120 205.5 88 5760 5 46.26316 39.31579 2112.5 24 167.5 120 205.5 89 5760 5 50.15789 39.31579 2112.5 24 167.5 120 205.5 90 5760 5 54.05263 39.31579 2112.5 24 167.5 120 205.5 91 5760 5 57.94737 39.31579 2112.5 24 167.5 120 205.5 92 5760 5 61.84211 39.31579 2112.5 24 167.5 120 205.5 93 5760 5 65.73684 39.31579 2112.5 24 167.5 120 205.5 94 5760 5 69.63158 39.31579 2112.5 24 167.5 120 205.5 95 5760 5 73.52632 39.31579 2112.5 24 167.5 120 205.5 96 5760 5 77.42105 39.31579 2112.5 24 167.5 120 205.5 97 5760 5 81.31579 39.31579 2112.5 24 167.5 120 205.5 98 5760 5 85.21053 39.31579 2112.5 24 167.5 120 205.5 99 5760 5 89.10526 39.31579 2112.5 24 167.5 120 205.5 100 5760 5 93.00000 39.31579 2112.5 24 167.5 120 205.5 101 5760 5 19.00000 42.89474 2112.5 24 167.5 120 205.5 102 5760 5 22.89474 42.89474 2112.5 24 167.5 120 205.5 103 5760 5 26.78947 42.89474 2112.5 24 167.5 120 205.5 104 5760 5 30.68421 42.89474 2112.5 24 167.5 120 205.5 105 5760 5 34.57895 42.89474 2112.5 24 167.5 120 205.5 106 5760 5 38.47368 42.89474 2112.5 24 167.5 120 205.5 107 5760 5 42.36842 42.89474 2112.5 24 167.5 120 205.5 108 5760 5 46.26316 42.89474 2112.5 24 167.5 120 205.5 109 5760 5 50.15789 42.89474 2112.5 24 167.5 120 205.5 110 5760 5 54.05263 42.89474 2112.5 24 167.5 120 205.5 111 5760 5 57.94737 42.89474 2112.5 24 167.5 120 205.5 112 5760 5 61.84211 42.89474 2112.5 24 167.5 120 205.5 113 5760 5 65.73684 42.89474 2112.5 24 167.5 120 205.5 114 5760 5 69.63158 42.89474 2112.5 24 167.5 120 205.5 115 5760 5 73.52632 42.89474 2112.5 24 167.5 120 205.5 116 5760 5 77.42105 42.89474 2112.5 24 167.5 120 205.5 117 5760 5 81.31579 42.89474 2112.5 24 167.5 120 205.5 118 5760 5 85.21053 42.89474 2112.5 24 167.5 120 205.5 119 5760 5 89.10526 42.89474 2112.5 24 167.5 120 205.5 120 5760 5 93.00000 42.89474 2112.5 24 167.5 120 205.5 121 5760 5 19.00000 46.47368 2112.5 24 167.5 120 205.5 122 5760 5 22.89474 46.47368 2112.5 24 167.5 120 205.5 123 5760 5 26.78947 46.47368 2112.5 24 167.5 120 205.5 124 5760 5 30.68421 46.47368 2112.5 24 167.5 120 205.5 125 5760 5 34.57895 46.47368 2112.5 24 167.5 120 205.5 126 5760 5 38.47368 46.47368 2112.5 24 167.5 120 205.5 127 5760 5 42.36842 46.47368 2112.5 24 167.5 120 205.5 128 5760 5 46.26316 46.47368 2112.5 24 167.5 120 205.5 129 5760 5 50.15789 46.47368 2112.5 24 167.5 120 205.5 130 5760 5 54.05263 46.47368 2112.5 24 167.5 120 205.5 131 5760 5 57.94737 46.47368 2112.5 24 167.5 120 205.5 132 5760 5 61.84211 46.47368 2112.5 24 167.5 120 205.5 133 5760 5 65.73684 46.47368 2112.5 24 167.5 120 205.5 134 5760 5 69.63158 46.47368 2112.5 24 167.5 120 205.5 135 5760 5 73.52632 46.47368 2112.5 24 167.5 120 205.5 136 5760 5 77.42105 46.47368 2112.5 24 167.5 120 205.5 137 5760 5 81.31579 46.47368 2112.5 24 167.5 120 205.5 138 5760 5 85.21053 46.47368 2112.5 24 167.5 120 205.5 139 5760 5 89.10526 46.47368 2112.5 24 167.5 120 205.5 140 5760 5 93.00000 46.47368 2112.5 24 167.5 120 205.5 141 5760 5 19.00000 50.05263 2112.5 24 167.5 120 205.5 142 5760 5 22.89474 50.05263 2112.5 24 167.5 120 205.5 143 5760 5 26.78947 50.05263 2112.5 24 167.5 120 205.5 144 5760 5 30.68421 50.05263 2112.5 24 167.5 120 205.5 145 5760 5 34.57895 50.05263 2112.5 24 167.5 120 205.5 146 5760 5 38.47368 50.05263 2112.5 24 167.5 120 205.5 147 5760 5 42.36842 50.05263 2112.5 24 167.5 120 205.5 148 5760 5 46.26316 50.05263 2112.5 24 167.5 120 205.5 149 5760 5 50.15789 50.05263 2112.5 24 167.5 120 205.5 150 5760 5 54.05263 50.05263 2112.5 24 167.5 120 205.5 151 5760 5 57.94737 50.05263 2112.5 24 167.5 120 205.5 152 5760 5 61.84211 50.05263 2112.5 24 167.5 120 205.5 153 5760 5 65.73684 50.05263 2112.5 24 167.5 120 205.5 154 5760 5 69.63158 50.05263 2112.5 24 167.5 120 205.5 155 5760 5 73.52632 50.05263 2112.5 24 167.5 120 205.5 156 5760 5 77.42105 50.05263 2112.5 24 167.5 120 205.5 157 5760 5 81.31579 50.05263 2112.5 24 167.5 120 205.5 158 5760 5 85.21053 50.05263 2112.5 24 167.5 120 205.5 159 5760 5 89.10526 50.05263 2112.5 24 167.5 120 205.5 160 5760 5 93.00000 50.05263 2112.5 24 167.5 120 205.5 161 5760 5 19.00000 53.63158 2112.5 24 167.5 120 205.5 162 5760 5 22.89474 53.63158 2112.5 24 167.5 120 205.5 163 5760 5 26.78947 53.63158 2112.5 24 167.5 120 205.5 164 5760 5 30.68421 53.63158 2112.5 24 167.5 120 205.5 165 5760 5 34.57895 53.63158 2112.5 24 167.5 120 205.5 166 5760 5 38.47368 53.63158 2112.5 24 167.5 120 205.5 167 5760 5 42.36842 53.63158 2112.5 24 167.5 120 205.5 168 5760 5 46.26316 53.63158 2112.5 24 167.5 120 205.5 169 5760 5 50.15789 53.63158 2112.5 24 167.5 120 205.5 170 5760 5 54.05263 53.63158 2112.5 24 167.5 120 205.5 171 5760 5 57.94737 53.63158 2112.5 24 167.5 120 205.5 172 5760 5 61.84211 53.63158 2112.5 24 167.5 120 205.5 173 5760 5 65.73684 53.63158 2112.5 24 167.5 120 205.5 174 5760 5 69.63158 53.63158 2112.5 24 167.5 120 205.5 175 5760 5 73.52632 53.63158 2112.5 24 167.5 120 205.5 176 5760 5 77.42105 53.63158 2112.5 24 167.5 120 205.5 177 5760 5 81.31579 53.63158 2112.5 24 167.5 120 205.5 178 5760 5 85.21053 53.63158 2112.5 24 167.5 120 205.5 179 5760 5 89.10526 53.63158 2112.5 24 167.5 120 205.5 180 5760 5 93.00000 53.63158 2112.5 24 167.5 120 205.5 181 5760 5 19.00000 57.21053 2112.5 24 167.5 120 205.5 182 5760 5 22.89474 57.21053 2112.5 24 167.5 120 205.5 183 5760 5 26.78947 57.21053 2112.5 24 167.5 120 205.5 184 5760 5 30.68421 57.21053 2112.5 24 167.5 120 205.5 185 5760 5 34.57895 57.21053 2112.5 24 167.5 120 205.5 186 5760 5 38.47368 57.21053 2112.5 24 167.5 120 205.5 187 5760 5 42.36842 57.21053 2112.5 24 167.5 120 205.5 188 5760 5 46.26316 57.21053 2112.5 24 167.5 120 205.5 189 5760 5 50.15789 57.21053 2112.5 24 167.5 120 205.5 190 5760 5 54.05263 57.21053 2112.5 24 167.5 120 205.5 191 5760 5 57.94737 57.21053 2112.5 24 167.5 120 205.5 192 5760 5 61.84211 57.21053 2112.5 24 167.5 120 205.5 193 5760 5 65.73684 57.21053 2112.5 24 167.5 120 205.5 194 5760 5 69.63158 57.21053 2112.5 24 167.5 120 205.5 195 5760 5 73.52632 57.21053 2112.5 24 167.5 120 205.5 196 5760 5 77.42105 57.21053 2112.5 24 167.5 120 205.5 197 5760 5 81.31579 57.21053 2112.5 24 167.5 120 205.5 198 5760 5 85.21053 57.21053 2112.5 24 167.5 120 205.5 199 5760 5 89.10526 57.21053 2112.5 24 167.5 120 205.5 200 5760 5 93.00000 57.21053 2112.5 24 167.5 120 205.5 201 5760 5 19.00000 60.78947 2112.5 24 167.5 120 205.5 202 5760 5 22.89474 60.78947 2112.5 24 167.5 120 205.5 203 5760 5 26.78947 60.78947 2112.5 24 167.5 120 205.5 204 5760 5 30.68421 60.78947 2112.5 24 167.5 120 205.5 205 5760 5 34.57895 60.78947 2112.5 24 167.5 120 205.5 206 5760 5 38.47368 60.78947 2112.5 24 167.5 120 205.5 207 5760 5 42.36842 60.78947 2112.5 24 167.5 120 205.5 208 5760 5 46.26316 60.78947 2112.5 24 167.5 120 205.5 209 5760 5 50.15789 60.78947 2112.5 24 167.5 120 205.5 210 5760 5 54.05263 60.78947 2112.5 24 167.5 120 205.5 211 5760 5 57.94737 60.78947 2112.5 24 167.5 120 205.5 212 5760 5 61.84211 60.78947 2112.5 24 167.5 120 205.5 213 5760 5 65.73684 60.78947 2112.5 24 167.5 120 205.5 214 5760 5 69.63158 60.78947 2112.5 24 167.5 120 205.5 215 5760 5 73.52632 60.78947 2112.5 24 167.5 120 205.5 216 5760 5 77.42105 60.78947 2112.5 24 167.5 120 205.5 217 5760 5 81.31579 60.78947 2112.5 24 167.5 120 205.5 218 5760 5 85.21053 60.78947 2112.5 24 167.5 120 205.5 219 5760 5 89.10526 60.78947 2112.5 24 167.5 120 205.5 220 5760 5 93.00000 60.78947 2112.5 24 167.5 120 205.5 221 5760 5 19.00000 64.36842 2112.5 24 167.5 120 205.5 222 5760 5 22.89474 64.36842 2112.5 24 167.5 120 205.5 223 5760 5 26.78947 64.36842 2112.5 24 167.5 120 205.5 224 5760 5 30.68421 64.36842 2112.5 24 167.5 120 205.5 225 5760 5 34.57895 64.36842 2112.5 24 167.5 120 205.5 226 5760 5 38.47368 64.36842 2112.5 24 167.5 120 205.5 227 5760 5 42.36842 64.36842 2112.5 24 167.5 120 205.5 228 5760 5 46.26316 64.36842 2112.5 24 167.5 120 205.5 229 5760 5 50.15789 64.36842 2112.5 24 167.5 120 205.5 230 5760 5 54.05263 64.36842 2112.5 24 167.5 120 205.5 231 5760 5 57.94737 64.36842 2112.5 24 167.5 120 205.5 232 5760 5 61.84211 64.36842 2112.5 24 167.5 120 205.5 233 5760 5 65.73684 64.36842 2112.5 24 167.5 120 205.5 234 5760 5 69.63158 64.36842 2112.5 24 167.5 120 205.5 235 5760 5 73.52632 64.36842 2112.5 24 167.5 120 205.5 236 5760 5 77.42105 64.36842 2112.5 24 167.5 120 205.5 237 5760 5 81.31579 64.36842 2112.5 24 167.5 120 205.5 238 5760 5 85.21053 64.36842 2112.5 24 167.5 120 205.5 239 5760 5 89.10526 64.36842 2112.5 24 167.5 120 205.5 240 5760 5 93.00000 64.36842 2112.5 24 167.5 120 205.5 241 5760 5 19.00000 67.94737 2112.5 24 167.5 120 205.5 242 5760 5 22.89474 67.94737 2112.5 24 167.5 120 205.5 243 5760 5 26.78947 67.94737 2112.5 24 167.5 120 205.5 244 5760 5 30.68421 67.94737 2112.5 24 167.5 120 205.5 245 5760 5 34.57895 67.94737 2112.5 24 167.5 120 205.5 246 5760 5 38.47368 67.94737 2112.5 24 167.5 120 205.5 247 5760 5 42.36842 67.94737 2112.5 24 167.5 120 205.5 248 5760 5 46.26316 67.94737 2112.5 24 167.5 120 205.5 249 5760 5 50.15789 67.94737 2112.5 24 167.5 120 205.5 250 5760 5 54.05263 67.94737 2112.5 24 167.5 120 205.5 251 5760 5 57.94737 67.94737 2112.5 24 167.5 120 205.5 252 5760 5 61.84211 67.94737 2112.5 24 167.5 120 205.5 253 5760 5 65.73684 67.94737 2112.5 24 167.5 120 205.5 254 5760 5 69.63158 67.94737 2112.5 24 167.5 120 205.5 255 5760 5 73.52632 67.94737 2112.5 24 167.5 120 205.5 256 5760 5 77.42105 67.94737 2112.5 24 167.5 120 205.5 257 5760 5 81.31579 67.94737 2112.5 24 167.5 120 205.5 258 5760 5 85.21053 67.94737 2112.5 24 167.5 120 205.5 259 5760 5 89.10526 67.94737 2112.5 24 167.5 120 205.5 260 5760 5 93.00000 67.94737 2112.5 24 167.5 120 205.5 261 5760 5 19.00000 71.52632 2112.5 24 167.5 120 205.5 262 5760 5 22.89474 71.52632 2112.5 24 167.5 120 205.5 263 5760 5 26.78947 71.52632 2112.5 24 167.5 120 205.5 264 5760 5 30.68421 71.52632 2112.5 24 167.5 120 205.5 265 5760 5 34.57895 71.52632 2112.5 24 167.5 120 205.5 266 5760 5 38.47368 71.52632 2112.5 24 167.5 120 205.5 267 5760 5 42.36842 71.52632 2112.5 24 167.5 120 205.5 268 5760 5 46.26316 71.52632 2112.5 24 167.5 120 205.5 269 5760 5 50.15789 71.52632 2112.5 24 167.5 120 205.5 270 5760 5 54.05263 71.52632 2112.5 24 167.5 120 205.5 271 5760 5 57.94737 71.52632 2112.5 24 167.5 120 205.5 272 5760 5 61.84211 71.52632 2112.5 24 167.5 120 205.5 273 5760 5 65.73684 71.52632 2112.5 24 167.5 120 205.5 274 5760 5 69.63158 71.52632 2112.5 24 167.5 120 205.5 275 5760 5 73.52632 71.52632 2112.5 24 167.5 120 205.5 276 5760 5 77.42105 71.52632 2112.5 24 167.5 120 205.5 277 5760 5 81.31579 71.52632 2112.5 24 167.5 120 205.5 278 5760 5 85.21053 71.52632 2112.5 24 167.5 120 205.5 279 5760 5 89.10526 71.52632 2112.5 24 167.5 120 205.5 280 5760 5 93.00000 71.52632 2112.5 24 167.5 120 205.5 281 5760 5 19.00000 75.10526 2112.5 24 167.5 120 205.5 282 5760 5 22.89474 75.10526 2112.5 24 167.5 120 205.5 283 5760 5 26.78947 75.10526 2112.5 24 167.5 120 205.5 284 5760 5 30.68421 75.10526 2112.5 24 167.5 120 205.5 285 5760 5 34.57895 75.10526 2112.5 24 167.5 120 205.5 286 5760 5 38.47368 75.10526 2112.5 24 167.5 120 205.5 287 5760 5 42.36842 75.10526 2112.5 24 167.5 120 205.5 288 5760 5 46.26316 75.10526 2112.5 24 167.5 120 205.5 289 5760 5 50.15789 75.10526 2112.5 24 167.5 120 205.5 290 5760 5 54.05263 75.10526 2112.5 24 167.5 120 205.5 291 5760 5 57.94737 75.10526 2112.5 24 167.5 120 205.5 292 5760 5 61.84211 75.10526 2112.5 24 167.5 120 205.5 293 5760 5 65.73684 75.10526 2112.5 24 167.5 120 205.5 294 5760 5 69.63158 75.10526 2112.5 24 167.5 120 205.5 295 5760 5 73.52632 75.10526 2112.5 24 167.5 120 205.5 296 5760 5 77.42105 75.10526 2112.5 24 167.5 120 205.5 297 5760 5 81.31579 75.10526 2112.5 24 167.5 120 205.5 298 5760 5 85.21053 75.10526 2112.5 24 167.5 120 205.5 299 5760 5 89.10526 75.10526 2112.5 24 167.5 120 205.5 300 5760 5 93.00000 75.10526 2112.5 24 167.5 120 205.5 301 5760 5 19.00000 78.68421 2112.5 24 167.5 120 205.5 302 5760 5 22.89474 78.68421 2112.5 24 167.5 120 205.5 303 5760 5 26.78947 78.68421 2112.5 24 167.5 120 205.5 304 5760 5 30.68421 78.68421 2112.5 24 167.5 120 205.5 305 5760 5 34.57895 78.68421 2112.5 24 167.5 120 205.5 306 5760 5 38.47368 78.68421 2112.5 24 167.5 120 205.5 307 5760 5 42.36842 78.68421 2112.5 24 167.5 120 205.5 308 5760 5 46.26316 78.68421 2112.5 24 167.5 120 205.5 309 5760 5 50.15789 78.68421 2112.5 24 167.5 120 205.5 310 5760 5 54.05263 78.68421 2112.5 24 167.5 120 205.5 311 5760 5 57.94737 78.68421 2112.5 24 167.5 120 205.5 312 5760 5 61.84211 78.68421 2112.5 24 167.5 120 205.5 313 5760 5 65.73684 78.68421 2112.5 24 167.5 120 205.5 314 5760 5 69.63158 78.68421 2112.5 24 167.5 120 205.5 315 5760 5 73.52632 78.68421 2112.5 24 167.5 120 205.5 316 5760 5 77.42105 78.68421 2112.5 24 167.5 120 205.5 317 5760 5 81.31579 78.68421 2112.5 24 167.5 120 205.5 318 5760 5 85.21053 78.68421 2112.5 24 167.5 120 205.5 319 5760 5 89.10526 78.68421 2112.5 24 167.5 120 205.5 320 5760 5 93.00000 78.68421 2112.5 24 167.5 120 205.5 321 5760 5 19.00000 82.26316 2112.5 24 167.5 120 205.5 322 5760 5 22.89474 82.26316 2112.5 24 167.5 120 205.5 323 5760 5 26.78947 82.26316 2112.5 24 167.5 120 205.5 324 5760 5 30.68421 82.26316 2112.5 24 167.5 120 205.5 325 5760 5 34.57895 82.26316 2112.5 24 167.5 120 205.5 326 5760 5 38.47368 82.26316 2112.5 24 167.5 120 205.5 327 5760 5 42.36842 82.26316 2112.5 24 167.5 120 205.5 328 5760 5 46.26316 82.26316 2112.5 24 167.5 120 205.5 329 5760 5 50.15789 82.26316 2112.5 24 167.5 120 205.5 330 5760 5 54.05263 82.26316 2112.5 24 167.5 120 205.5 331 5760 5 57.94737 82.26316 2112.5 24 167.5 120 205.5 332 5760 5 61.84211 82.26316 2112.5 24 167.5 120 205.5 333 5760 5 65.73684 82.26316 2112.5 24 167.5 120 205.5 334 5760 5 69.63158 82.26316 2112.5 24 167.5 120 205.5 335 5760 5 73.52632 82.26316 2112.5 24 167.5 120 205.5 336 5760 5 77.42105 82.26316 2112.5 24 167.5 120 205.5 337 5760 5 81.31579 82.26316 2112.5 24 167.5 120 205.5 338 5760 5 85.21053 82.26316 2112.5 24 167.5 120 205.5 339 5760 5 89.10526 82.26316 2112.5 24 167.5 120 205.5 340 5760 5 93.00000 82.26316 2112.5 24 167.5 120 205.5 341 5760 5 19.00000 85.84211 2112.5 24 167.5 120 205.5 342 5760 5 22.89474 85.84211 2112.5 24 167.5 120 205.5 343 5760 5 26.78947 85.84211 2112.5 24 167.5 120 205.5 344 5760 5 30.68421 85.84211 2112.5 24 167.5 120 205.5 345 5760 5 34.57895 85.84211 2112.5 24 167.5 120 205.5 346 5760 5 38.47368 85.84211 2112.5 24 167.5 120 205.5 347 5760 5 42.36842 85.84211 2112.5 24 167.5 120 205.5 348 5760 5 46.26316 85.84211 2112.5 24 167.5 120 205.5 349 5760 5 50.15789 85.84211 2112.5 24 167.5 120 205.5 350 5760 5 54.05263 85.84211 2112.5 24 167.5 120 205.5 351 5760 5 57.94737 85.84211 2112.5 24 167.5 120 205.5 352 5760 5 61.84211 85.84211 2112.5 24 167.5 120 205.5 353 5760 5 65.73684 85.84211 2112.5 24 167.5 120 205.5 354 5760 5 69.63158 85.84211 2112.5 24 167.5 120 205.5 355 5760 5 73.52632 85.84211 2112.5 24 167.5 120 205.5 356 5760 5 77.42105 85.84211 2112.5 24 167.5 120 205.5 357 5760 5 81.31579 85.84211 2112.5 24 167.5 120 205.5 358 5760 5 85.21053 85.84211 2112.5 24 167.5 120 205.5 359 5760 5 89.10526 85.84211 2112.5 24 167.5 120 205.5 360 5760 5 93.00000 85.84211 2112.5 24 167.5 120 205.5 361 5760 5 19.00000 89.42105 2112.5 24 167.5 120 205.5 362 5760 5 22.89474 89.42105 2112.5 24 167.5 120 205.5 363 5760 5 26.78947 89.42105 2112.5 24 167.5 120 205.5 364 5760 5 30.68421 89.42105 2112.5 24 167.5 120 205.5 365 5760 5 34.57895 89.42105 2112.5 24 167.5 120 205.5 366 5760 5 38.47368 89.42105 2112.5 24 167.5 120 205.5 367 5760 5 42.36842 89.42105 2112.5 24 167.5 120 205.5 368 5760 5 46.26316 89.42105 2112.5 24 167.5 120 205.5 369 5760 5 50.15789 89.42105 2112.5 24 167.5 120 205.5 370 5760 5 54.05263 89.42105 2112.5 24 167.5 120 205.5 371 5760 5 57.94737 89.42105 2112.5 24 167.5 120 205.5 372 5760 5 61.84211 89.42105 2112.5 24 167.5 120 205.5 373 5760 5 65.73684 89.42105 2112.5 24 167.5 120 205.5 374 5760 5 69.63158 89.42105 2112.5 24 167.5 120 205.5 375 5760 5 73.52632 89.42105 2112.5 24 167.5 120 205.5 376 5760 5 77.42105 89.42105 2112.5 24 167.5 120 205.5 377 5760 5 81.31579 89.42105 2112.5 24 167.5 120 205.5 378 5760 5 85.21053 89.42105 2112.5 24 167.5 120 205.5 379 5760 5 89.10526 89.42105 2112.5 24 167.5 120 205.5 380 5760 5 93.00000 89.42105 2112.5 24 167.5 120 205.5 381 5760 5 19.00000 93.00000 2112.5 24 167.5 120 205.5 382 5760 5 22.89474 93.00000 2112.5 24 167.5 120 205.5 383 5760 5 26.78947 93.00000 2112.5 24 167.5 120 205.5 384 5760 5 30.68421 93.00000 2112.5 24 167.5 120 205.5 385 5760 5 34.57895 93.00000 2112.5 24 167.5 120 205.5 386 5760 5 38.47368 93.00000 2112.5 24 167.5 120 205.5 387 5760 5 42.36842 93.00000 2112.5 24 167.5 120 205.5 388 5760 5 46.26316 93.00000 2112.5 24 167.5 120 205.5 389 5760 5 50.15789 93.00000 2112.5 24 167.5 120 205.5 390 5760 5 54.05263 93.00000 2112.5 24 167.5 120 205.5 391 5760 5 57.94737 93.00000 2112.5 24 167.5 120 205.5 392 5760 5 61.84211 93.00000 2112.5 24 167.5 120 205.5 393 5760 5 65.73684 93.00000 2112.5 24 167.5 120 205.5 394 5760 5 69.63158 93.00000 2112.5 24 167.5 120 205.5 395 5760 5 73.52632 93.00000 2112.5 24 167.5 120 205.5 396 5760 5 77.42105 93.00000 2112.5 24 167.5 120 205.5 397 5760 5 81.31579 93.00000 2112.5 24 167.5 120 205.5 398 5760 5 85.21053 93.00000 2112.5 24 167.5 120 205.5 399 5760 5 89.10526 93.00000 2112.5 24 167.5 120 205.5 400 5760 5 93.00000 93.00000 2112.5 24 167.5 120 205.5 vh wind humidity temp ibh Min. :5760 Min. :5 Min. :19.0 Min. :25 Min. :2112 1st Qu.:5760 1st Qu.:5 1st Qu.:37.5 1st Qu.:42 1st Qu.:2112 Median :5760 Median :5 Median :56.0 Median :59 Median :2112 Mean :5760 Mean :5 Mean :56.0 Mean :59 Mean :2112 3rd Qu.:5760 3rd Qu.:5 3rd Qu.:74.5 3rd Qu.:76 3rd Qu.:2112 Max. :5760 Max. :5 Max. :93.0 Max. :93 Max. :2112 dpg ibt vis doy Min. :24 Min. :167.5 Min. :120 Min. :205.5 1st Qu.:24 1st Qu.:167.5 1st Qu.:120 1st Qu.:205.5 Median :24 Median :167.5 Median :120 Median :205.5 Mean :24 Mean :167.5 Mean :120 Mean :205.5 3rd Qu.:24 3rd Qu.:167.5 3rd Qu.:120 3rd Qu.:205.5 Max. :24 Max. :167.5 Max. :120 Max. :205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 19.00000 25 2112.5 24 167.5 120 205.5 2 5760 5 22.89474 25 2112.5 24 167.5 120 205.5 3 5760 5 26.78947 25 2112.5 24 167.5 120 205.5 4 5760 5 30.68421 25 2112.5 24 167.5 120 205.5 5 5760 5 34.57895 25 2112.5 24 167.5 120 205.5 6 5760 5 38.47368 25 2112.5 24 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 19.00000 25 2112.5 24 167.5 120 205.5 2 5760 5 22.89474 25 2112.5 24 167.5 120 205.5 3 5760 5 26.78947 25 2112.5 24 167.5 120 205.5 4 5760 5 30.68421 25 2112.5 24 167.5 120 205.5 5 5760 5 34.57895 25 2112.5 24 167.5 120 205.5 6 5760 5 38.47368 25 2112.5 24 167.5 120 205.5 predict.earth: bx is a 400 by 15 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis) First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 0 33 1043.5 0 116.5 [2,] 1 0 33 1043.5 0 116.5 [3,] 1 0 33 1043.5 0 116.5 [4,] 1 0 33 1043.5 0 116.5 [5,] 1 0 33 1043.5 0 116.5 [6,] 1 0 33 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 [5,] 0 0 0 [6,] 0 0 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 0 0 80 [2,] 0 0 0 80 [3,] 0 0 0 80 [4,] 0 0 0 80 [5,] 0 0 0 80 [6,] 0 0 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) [1,] 0 160 [2,] 0 160 [3,] 0 160 [4,] 0 160 [5,] 0 160 [6,] 0 160 predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min 5.18223 max 32.00776 value 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.18223 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 5.744986 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.307743 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 6.870499 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.433256 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 7.996012 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 8.558768 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.121525 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 9.684281 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 10.24704 9.980383 10.17102 10.36165 10.55229 10.74293 10.93356 11.1242 11.31483 11.50547 11.69611 11.80743 11.83945 11.87147 11.90349 11.9355 11.96752 11.99954 12.03156 12.06358 12.09559 9.478989 9.914214 10.34944 10.78466 11.21989 11.65511 12.09034 12.52557 12.96079 13.39602 13.65018 13.72327 13.79637 13.86947 13.94257 14.01567 14.08876 14.16186 14.23496 14.30806 8.977595 9.65741 10.33722 11.01704 11.69685 12.37667 13.05648 13.7363 14.41611 15.09593 15.49292 15.6071 15.72128 15.83545 15.94963 16.06381 16.17799 16.29216 16.40634 16.52052 8.476202 9.400605 10.32501 11.24941 12.17382 13.09822 14.02263 14.94703 15.87143 16.79584 17.33567 17.49092 17.64618 17.80144 17.9567 18.11195 18.26721 18.42247 18.57772 18.73298 7.974808 9.143801 10.31279 11.48179 12.65078 13.81977 14.98877 16.15776 17.32675 18.49575 19.17841 19.37475 19.57109 19.76742 19.96376 20.1601 20.35643 20.55277 20.74911 20.94544 7.473414 8.886997 10.30058 11.71416 13.12774 14.54133 15.95491 17.36849 18.78208 20.19566 21.02116 21.25857 21.49599 21.73341 21.97082 22.20824 22.44566 22.68307 22.92049 23.15791 6.97202 8.630192 10.28836 11.94654 13.60471 15.26288 16.92105 18.57922 20.2374 21.89557 22.8639 23.1424 23.4209 23.69939 23.97789 24.25638 24.53488 24.81338 25.09187 25.37037 6.470627 8.373388 10.27615 12.17891 14.08167 15.98443 17.88719 19.78996 21.69272 23.59548 24.70665 25.02622 25.3458 25.66538 25.98495 26.30453 26.6241 26.94368 27.26326 27.58283 5.969233 8.116584 10.26393 12.41129 14.55864 16.70599 18.85334 21.00069 23.14804 25.29539 26.54939 26.91005 27.2707 27.63136 27.99202 28.35267 28.71333 29.07398 29.43464 29.79529 5.467839 7.859779 10.25172 12.64366 15.0356 17.42754 19.81948 22.21142 24.60336 26.9953 28.39214 28.79387 29.19561 29.59734 29.99908 30.40081 30.80255 31.20429 31.60602 32.00776 O3 Min. : 5.182 1st Qu.: 7.433 Median :10.209 Mean :12.510 3rd Qu.:16.004 Max. :32.008 plotmo.predict(type="response") for degree2 plot "temp:dpg" with newdata[400,9]: vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 -69.000000 167.5 120 205.5 2 5760 5 64 28.57895 2112.5 -69.000000 167.5 120 205.5 3 5760 5 64 32.15789 2112.5 -69.000000 167.5 120 205.5 4 5760 5 64 35.73684 2112.5 -69.000000 167.5 120 205.5 5 5760 5 64 39.31579 2112.5 -69.000000 167.5 120 205.5 6 5760 5 64 42.89474 2112.5 -69.000000 167.5 120 205.5 7 5760 5 64 46.47368 2112.5 -69.000000 167.5 120 205.5 8 5760 5 64 50.05263 2112.5 -69.000000 167.5 120 205.5 9 5760 5 64 53.63158 2112.5 -69.000000 167.5 120 205.5 10 5760 5 64 57.21053 2112.5 -69.000000 167.5 120 205.5 11 5760 5 64 60.78947 2112.5 -69.000000 167.5 120 205.5 12 5760 5 64 64.36842 2112.5 -69.000000 167.5 120 205.5 13 5760 5 64 67.94737 2112.5 -69.000000 167.5 120 205.5 14 5760 5 64 71.52632 2112.5 -69.000000 167.5 120 205.5 15 5760 5 64 75.10526 2112.5 -69.000000 167.5 120 205.5 16 5760 5 64 78.68421 2112.5 -69.000000 167.5 120 205.5 17 5760 5 64 82.26316 2112.5 -69.000000 167.5 120 205.5 18 5760 5 64 85.84211 2112.5 -69.000000 167.5 120 205.5 19 5760 5 64 89.42105 2112.5 -69.000000 167.5 120 205.5 20 5760 5 64 93.00000 2112.5 -69.000000 167.5 120 205.5 21 5760 5 64 25.00000 2112.5 -59.736842 167.5 120 205.5 22 5760 5 64 28.57895 2112.5 -59.736842 167.5 120 205.5 23 5760 5 64 32.15789 2112.5 -59.736842 167.5 120 205.5 24 5760 5 64 35.73684 2112.5 -59.736842 167.5 120 205.5 25 5760 5 64 39.31579 2112.5 -59.736842 167.5 120 205.5 26 5760 5 64 42.89474 2112.5 -59.736842 167.5 120 205.5 27 5760 5 64 46.47368 2112.5 -59.736842 167.5 120 205.5 28 5760 5 64 50.05263 2112.5 -59.736842 167.5 120 205.5 29 5760 5 64 53.63158 2112.5 -59.736842 167.5 120 205.5 30 5760 5 64 57.21053 2112.5 -59.736842 167.5 120 205.5 31 5760 5 64 60.78947 2112.5 -59.736842 167.5 120 205.5 32 5760 5 64 64.36842 2112.5 -59.736842 167.5 120 205.5 33 5760 5 64 67.94737 2112.5 -59.736842 167.5 120 205.5 34 5760 5 64 71.52632 2112.5 -59.736842 167.5 120 205.5 35 5760 5 64 75.10526 2112.5 -59.736842 167.5 120 205.5 36 5760 5 64 78.68421 2112.5 -59.736842 167.5 120 205.5 37 5760 5 64 82.26316 2112.5 -59.736842 167.5 120 205.5 38 5760 5 64 85.84211 2112.5 -59.736842 167.5 120 205.5 39 5760 5 64 89.42105 2112.5 -59.736842 167.5 120 205.5 40 5760 5 64 93.00000 2112.5 -59.736842 167.5 120 205.5 41 5760 5 64 25.00000 2112.5 -50.473684 167.5 120 205.5 42 5760 5 64 28.57895 2112.5 -50.473684 167.5 120 205.5 43 5760 5 64 32.15789 2112.5 -50.473684 167.5 120 205.5 44 5760 5 64 35.73684 2112.5 -50.473684 167.5 120 205.5 45 5760 5 64 39.31579 2112.5 -50.473684 167.5 120 205.5 46 5760 5 64 42.89474 2112.5 -50.473684 167.5 120 205.5 47 5760 5 64 46.47368 2112.5 -50.473684 167.5 120 205.5 48 5760 5 64 50.05263 2112.5 -50.473684 167.5 120 205.5 49 5760 5 64 53.63158 2112.5 -50.473684 167.5 120 205.5 50 5760 5 64 57.21053 2112.5 -50.473684 167.5 120 205.5 51 5760 5 64 60.78947 2112.5 -50.473684 167.5 120 205.5 52 5760 5 64 64.36842 2112.5 -50.473684 167.5 120 205.5 53 5760 5 64 67.94737 2112.5 -50.473684 167.5 120 205.5 54 5760 5 64 71.52632 2112.5 -50.473684 167.5 120 205.5 55 5760 5 64 75.10526 2112.5 -50.473684 167.5 120 205.5 56 5760 5 64 78.68421 2112.5 -50.473684 167.5 120 205.5 57 5760 5 64 82.26316 2112.5 -50.473684 167.5 120 205.5 58 5760 5 64 85.84211 2112.5 -50.473684 167.5 120 205.5 59 5760 5 64 89.42105 2112.5 -50.473684 167.5 120 205.5 60 5760 5 64 93.00000 2112.5 -50.473684 167.5 120 205.5 61 5760 5 64 25.00000 2112.5 -41.210526 167.5 120 205.5 62 5760 5 64 28.57895 2112.5 -41.210526 167.5 120 205.5 63 5760 5 64 32.15789 2112.5 -41.210526 167.5 120 205.5 64 5760 5 64 35.73684 2112.5 -41.210526 167.5 120 205.5 65 5760 5 64 39.31579 2112.5 -41.210526 167.5 120 205.5 66 5760 5 64 42.89474 2112.5 -41.210526 167.5 120 205.5 67 5760 5 64 46.47368 2112.5 -41.210526 167.5 120 205.5 68 5760 5 64 50.05263 2112.5 -41.210526 167.5 120 205.5 69 5760 5 64 53.63158 2112.5 -41.210526 167.5 120 205.5 70 5760 5 64 57.21053 2112.5 -41.210526 167.5 120 205.5 71 5760 5 64 60.78947 2112.5 -41.210526 167.5 120 205.5 72 5760 5 64 64.36842 2112.5 -41.210526 167.5 120 205.5 73 5760 5 64 67.94737 2112.5 -41.210526 167.5 120 205.5 74 5760 5 64 71.52632 2112.5 -41.210526 167.5 120 205.5 75 5760 5 64 75.10526 2112.5 -41.210526 167.5 120 205.5 76 5760 5 64 78.68421 2112.5 -41.210526 167.5 120 205.5 77 5760 5 64 82.26316 2112.5 -41.210526 167.5 120 205.5 78 5760 5 64 85.84211 2112.5 -41.210526 167.5 120 205.5 79 5760 5 64 89.42105 2112.5 -41.210526 167.5 120 205.5 80 5760 5 64 93.00000 2112.5 -41.210526 167.5 120 205.5 81 5760 5 64 25.00000 2112.5 -31.947368 167.5 120 205.5 82 5760 5 64 28.57895 2112.5 -31.947368 167.5 120 205.5 83 5760 5 64 32.15789 2112.5 -31.947368 167.5 120 205.5 84 5760 5 64 35.73684 2112.5 -31.947368 167.5 120 205.5 85 5760 5 64 39.31579 2112.5 -31.947368 167.5 120 205.5 86 5760 5 64 42.89474 2112.5 -31.947368 167.5 120 205.5 87 5760 5 64 46.47368 2112.5 -31.947368 167.5 120 205.5 88 5760 5 64 50.05263 2112.5 -31.947368 167.5 120 205.5 89 5760 5 64 53.63158 2112.5 -31.947368 167.5 120 205.5 90 5760 5 64 57.21053 2112.5 -31.947368 167.5 120 205.5 91 5760 5 64 60.78947 2112.5 -31.947368 167.5 120 205.5 92 5760 5 64 64.36842 2112.5 -31.947368 167.5 120 205.5 93 5760 5 64 67.94737 2112.5 -31.947368 167.5 120 205.5 94 5760 5 64 71.52632 2112.5 -31.947368 167.5 120 205.5 95 5760 5 64 75.10526 2112.5 -31.947368 167.5 120 205.5 96 5760 5 64 78.68421 2112.5 -31.947368 167.5 120 205.5 97 5760 5 64 82.26316 2112.5 -31.947368 167.5 120 205.5 98 5760 5 64 85.84211 2112.5 -31.947368 167.5 120 205.5 99 5760 5 64 89.42105 2112.5 -31.947368 167.5 120 205.5 100 5760 5 64 93.00000 2112.5 -31.947368 167.5 120 205.5 101 5760 5 64 25.00000 2112.5 -22.684211 167.5 120 205.5 102 5760 5 64 28.57895 2112.5 -22.684211 167.5 120 205.5 103 5760 5 64 32.15789 2112.5 -22.684211 167.5 120 205.5 104 5760 5 64 35.73684 2112.5 -22.684211 167.5 120 205.5 105 5760 5 64 39.31579 2112.5 -22.684211 167.5 120 205.5 106 5760 5 64 42.89474 2112.5 -22.684211 167.5 120 205.5 107 5760 5 64 46.47368 2112.5 -22.684211 167.5 120 205.5 108 5760 5 64 50.05263 2112.5 -22.684211 167.5 120 205.5 109 5760 5 64 53.63158 2112.5 -22.684211 167.5 120 205.5 110 5760 5 64 57.21053 2112.5 -22.684211 167.5 120 205.5 111 5760 5 64 60.78947 2112.5 -22.684211 167.5 120 205.5 112 5760 5 64 64.36842 2112.5 -22.684211 167.5 120 205.5 113 5760 5 64 67.94737 2112.5 -22.684211 167.5 120 205.5 114 5760 5 64 71.52632 2112.5 -22.684211 167.5 120 205.5 115 5760 5 64 75.10526 2112.5 -22.684211 167.5 120 205.5 116 5760 5 64 78.68421 2112.5 -22.684211 167.5 120 205.5 117 5760 5 64 82.26316 2112.5 -22.684211 167.5 120 205.5 118 5760 5 64 85.84211 2112.5 -22.684211 167.5 120 205.5 119 5760 5 64 89.42105 2112.5 -22.684211 167.5 120 205.5 120 5760 5 64 93.00000 2112.5 -22.684211 167.5 120 205.5 121 5760 5 64 25.00000 2112.5 -13.421053 167.5 120 205.5 122 5760 5 64 28.57895 2112.5 -13.421053 167.5 120 205.5 123 5760 5 64 32.15789 2112.5 -13.421053 167.5 120 205.5 124 5760 5 64 35.73684 2112.5 -13.421053 167.5 120 205.5 125 5760 5 64 39.31579 2112.5 -13.421053 167.5 120 205.5 126 5760 5 64 42.89474 2112.5 -13.421053 167.5 120 205.5 127 5760 5 64 46.47368 2112.5 -13.421053 167.5 120 205.5 128 5760 5 64 50.05263 2112.5 -13.421053 167.5 120 205.5 129 5760 5 64 53.63158 2112.5 -13.421053 167.5 120 205.5 130 5760 5 64 57.21053 2112.5 -13.421053 167.5 120 205.5 131 5760 5 64 60.78947 2112.5 -13.421053 167.5 120 205.5 132 5760 5 64 64.36842 2112.5 -13.421053 167.5 120 205.5 133 5760 5 64 67.94737 2112.5 -13.421053 167.5 120 205.5 134 5760 5 64 71.52632 2112.5 -13.421053 167.5 120 205.5 135 5760 5 64 75.10526 2112.5 -13.421053 167.5 120 205.5 136 5760 5 64 78.68421 2112.5 -13.421053 167.5 120 205.5 137 5760 5 64 82.26316 2112.5 -13.421053 167.5 120 205.5 138 5760 5 64 85.84211 2112.5 -13.421053 167.5 120 205.5 139 5760 5 64 89.42105 2112.5 -13.421053 167.5 120 205.5 140 5760 5 64 93.00000 2112.5 -13.421053 167.5 120 205.5 141 5760 5 64 25.00000 2112.5 -4.157895 167.5 120 205.5 142 5760 5 64 28.57895 2112.5 -4.157895 167.5 120 205.5 143 5760 5 64 32.15789 2112.5 -4.157895 167.5 120 205.5 144 5760 5 64 35.73684 2112.5 -4.157895 167.5 120 205.5 145 5760 5 64 39.31579 2112.5 -4.157895 167.5 120 205.5 146 5760 5 64 42.89474 2112.5 -4.157895 167.5 120 205.5 147 5760 5 64 46.47368 2112.5 -4.157895 167.5 120 205.5 148 5760 5 64 50.05263 2112.5 -4.157895 167.5 120 205.5 149 5760 5 64 53.63158 2112.5 -4.157895 167.5 120 205.5 150 5760 5 64 57.21053 2112.5 -4.157895 167.5 120 205.5 151 5760 5 64 60.78947 2112.5 -4.157895 167.5 120 205.5 152 5760 5 64 64.36842 2112.5 -4.157895 167.5 120 205.5 153 5760 5 64 67.94737 2112.5 -4.157895 167.5 120 205.5 154 5760 5 64 71.52632 2112.5 -4.157895 167.5 120 205.5 155 5760 5 64 75.10526 2112.5 -4.157895 167.5 120 205.5 156 5760 5 64 78.68421 2112.5 -4.157895 167.5 120 205.5 157 5760 5 64 82.26316 2112.5 -4.157895 167.5 120 205.5 158 5760 5 64 85.84211 2112.5 -4.157895 167.5 120 205.5 159 5760 5 64 89.42105 2112.5 -4.157895 167.5 120 205.5 160 5760 5 64 93.00000 2112.5 -4.157895 167.5 120 205.5 161 5760 5 64 25.00000 2112.5 5.105263 167.5 120 205.5 162 5760 5 64 28.57895 2112.5 5.105263 167.5 120 205.5 163 5760 5 64 32.15789 2112.5 5.105263 167.5 120 205.5 164 5760 5 64 35.73684 2112.5 5.105263 167.5 120 205.5 165 5760 5 64 39.31579 2112.5 5.105263 167.5 120 205.5 166 5760 5 64 42.89474 2112.5 5.105263 167.5 120 205.5 167 5760 5 64 46.47368 2112.5 5.105263 167.5 120 205.5 168 5760 5 64 50.05263 2112.5 5.105263 167.5 120 205.5 169 5760 5 64 53.63158 2112.5 5.105263 167.5 120 205.5 170 5760 5 64 57.21053 2112.5 5.105263 167.5 120 205.5 171 5760 5 64 60.78947 2112.5 5.105263 167.5 120 205.5 172 5760 5 64 64.36842 2112.5 5.105263 167.5 120 205.5 173 5760 5 64 67.94737 2112.5 5.105263 167.5 120 205.5 174 5760 5 64 71.52632 2112.5 5.105263 167.5 120 205.5 175 5760 5 64 75.10526 2112.5 5.105263 167.5 120 205.5 176 5760 5 64 78.68421 2112.5 5.105263 167.5 120 205.5 177 5760 5 64 82.26316 2112.5 5.105263 167.5 120 205.5 178 5760 5 64 85.84211 2112.5 5.105263 167.5 120 205.5 179 5760 5 64 89.42105 2112.5 5.105263 167.5 120 205.5 180 5760 5 64 93.00000 2112.5 5.105263 167.5 120 205.5 181 5760 5 64 25.00000 2112.5 14.368421 167.5 120 205.5 182 5760 5 64 28.57895 2112.5 14.368421 167.5 120 205.5 183 5760 5 64 32.15789 2112.5 14.368421 167.5 120 205.5 184 5760 5 64 35.73684 2112.5 14.368421 167.5 120 205.5 185 5760 5 64 39.31579 2112.5 14.368421 167.5 120 205.5 186 5760 5 64 42.89474 2112.5 14.368421 167.5 120 205.5 187 5760 5 64 46.47368 2112.5 14.368421 167.5 120 205.5 188 5760 5 64 50.05263 2112.5 14.368421 167.5 120 205.5 189 5760 5 64 53.63158 2112.5 14.368421 167.5 120 205.5 190 5760 5 64 57.21053 2112.5 14.368421 167.5 120 205.5 191 5760 5 64 60.78947 2112.5 14.368421 167.5 120 205.5 192 5760 5 64 64.36842 2112.5 14.368421 167.5 120 205.5 193 5760 5 64 67.94737 2112.5 14.368421 167.5 120 205.5 194 5760 5 64 71.52632 2112.5 14.368421 167.5 120 205.5 195 5760 5 64 75.10526 2112.5 14.368421 167.5 120 205.5 196 5760 5 64 78.68421 2112.5 14.368421 167.5 120 205.5 197 5760 5 64 82.26316 2112.5 14.368421 167.5 120 205.5 198 5760 5 64 85.84211 2112.5 14.368421 167.5 120 205.5 199 5760 5 64 89.42105 2112.5 14.368421 167.5 120 205.5 200 5760 5 64 93.00000 2112.5 14.368421 167.5 120 205.5 201 5760 5 64 25.00000 2112.5 23.631579 167.5 120 205.5 202 5760 5 64 28.57895 2112.5 23.631579 167.5 120 205.5 203 5760 5 64 32.15789 2112.5 23.631579 167.5 120 205.5 204 5760 5 64 35.73684 2112.5 23.631579 167.5 120 205.5 205 5760 5 64 39.31579 2112.5 23.631579 167.5 120 205.5 206 5760 5 64 42.89474 2112.5 23.631579 167.5 120 205.5 207 5760 5 64 46.47368 2112.5 23.631579 167.5 120 205.5 208 5760 5 64 50.05263 2112.5 23.631579 167.5 120 205.5 209 5760 5 64 53.63158 2112.5 23.631579 167.5 120 205.5 210 5760 5 64 57.21053 2112.5 23.631579 167.5 120 205.5 211 5760 5 64 60.78947 2112.5 23.631579 167.5 120 205.5 212 5760 5 64 64.36842 2112.5 23.631579 167.5 120 205.5 213 5760 5 64 67.94737 2112.5 23.631579 167.5 120 205.5 214 5760 5 64 71.52632 2112.5 23.631579 167.5 120 205.5 215 5760 5 64 75.10526 2112.5 23.631579 167.5 120 205.5 216 5760 5 64 78.68421 2112.5 23.631579 167.5 120 205.5 217 5760 5 64 82.26316 2112.5 23.631579 167.5 120 205.5 218 5760 5 64 85.84211 2112.5 23.631579 167.5 120 205.5 219 5760 5 64 89.42105 2112.5 23.631579 167.5 120 205.5 220 5760 5 64 93.00000 2112.5 23.631579 167.5 120 205.5 221 5760 5 64 25.00000 2112.5 32.894737 167.5 120 205.5 222 5760 5 64 28.57895 2112.5 32.894737 167.5 120 205.5 223 5760 5 64 32.15789 2112.5 32.894737 167.5 120 205.5 224 5760 5 64 35.73684 2112.5 32.894737 167.5 120 205.5 225 5760 5 64 39.31579 2112.5 32.894737 167.5 120 205.5 226 5760 5 64 42.89474 2112.5 32.894737 167.5 120 205.5 227 5760 5 64 46.47368 2112.5 32.894737 167.5 120 205.5 228 5760 5 64 50.05263 2112.5 32.894737 167.5 120 205.5 229 5760 5 64 53.63158 2112.5 32.894737 167.5 120 205.5 230 5760 5 64 57.21053 2112.5 32.894737 167.5 120 205.5 231 5760 5 64 60.78947 2112.5 32.894737 167.5 120 205.5 232 5760 5 64 64.36842 2112.5 32.894737 167.5 120 205.5 233 5760 5 64 67.94737 2112.5 32.894737 167.5 120 205.5 234 5760 5 64 71.52632 2112.5 32.894737 167.5 120 205.5 235 5760 5 64 75.10526 2112.5 32.894737 167.5 120 205.5 236 5760 5 64 78.68421 2112.5 32.894737 167.5 120 205.5 237 5760 5 64 82.26316 2112.5 32.894737 167.5 120 205.5 238 5760 5 64 85.84211 2112.5 32.894737 167.5 120 205.5 239 5760 5 64 89.42105 2112.5 32.894737 167.5 120 205.5 240 5760 5 64 93.00000 2112.5 32.894737 167.5 120 205.5 241 5760 5 64 25.00000 2112.5 42.157895 167.5 120 205.5 242 5760 5 64 28.57895 2112.5 42.157895 167.5 120 205.5 243 5760 5 64 32.15789 2112.5 42.157895 167.5 120 205.5 244 5760 5 64 35.73684 2112.5 42.157895 167.5 120 205.5 245 5760 5 64 39.31579 2112.5 42.157895 167.5 120 205.5 246 5760 5 64 42.89474 2112.5 42.157895 167.5 120 205.5 247 5760 5 64 46.47368 2112.5 42.157895 167.5 120 205.5 248 5760 5 64 50.05263 2112.5 42.157895 167.5 120 205.5 249 5760 5 64 53.63158 2112.5 42.157895 167.5 120 205.5 250 5760 5 64 57.21053 2112.5 42.157895 167.5 120 205.5 251 5760 5 64 60.78947 2112.5 42.157895 167.5 120 205.5 252 5760 5 64 64.36842 2112.5 42.157895 167.5 120 205.5 253 5760 5 64 67.94737 2112.5 42.157895 167.5 120 205.5 254 5760 5 64 71.52632 2112.5 42.157895 167.5 120 205.5 255 5760 5 64 75.10526 2112.5 42.157895 167.5 120 205.5 256 5760 5 64 78.68421 2112.5 42.157895 167.5 120 205.5 257 5760 5 64 82.26316 2112.5 42.157895 167.5 120 205.5 258 5760 5 64 85.84211 2112.5 42.157895 167.5 120 205.5 259 5760 5 64 89.42105 2112.5 42.157895 167.5 120 205.5 260 5760 5 64 93.00000 2112.5 42.157895 167.5 120 205.5 261 5760 5 64 25.00000 2112.5 51.421053 167.5 120 205.5 262 5760 5 64 28.57895 2112.5 51.421053 167.5 120 205.5 263 5760 5 64 32.15789 2112.5 51.421053 167.5 120 205.5 264 5760 5 64 35.73684 2112.5 51.421053 167.5 120 205.5 265 5760 5 64 39.31579 2112.5 51.421053 167.5 120 205.5 266 5760 5 64 42.89474 2112.5 51.421053 167.5 120 205.5 267 5760 5 64 46.47368 2112.5 51.421053 167.5 120 205.5 268 5760 5 64 50.05263 2112.5 51.421053 167.5 120 205.5 269 5760 5 64 53.63158 2112.5 51.421053 167.5 120 205.5 270 5760 5 64 57.21053 2112.5 51.421053 167.5 120 205.5 271 5760 5 64 60.78947 2112.5 51.421053 167.5 120 205.5 272 5760 5 64 64.36842 2112.5 51.421053 167.5 120 205.5 273 5760 5 64 67.94737 2112.5 51.421053 167.5 120 205.5 274 5760 5 64 71.52632 2112.5 51.421053 167.5 120 205.5 275 5760 5 64 75.10526 2112.5 51.421053 167.5 120 205.5 276 5760 5 64 78.68421 2112.5 51.421053 167.5 120 205.5 277 5760 5 64 82.26316 2112.5 51.421053 167.5 120 205.5 278 5760 5 64 85.84211 2112.5 51.421053 167.5 120 205.5 279 5760 5 64 89.42105 2112.5 51.421053 167.5 120 205.5 280 5760 5 64 93.00000 2112.5 51.421053 167.5 120 205.5 281 5760 5 64 25.00000 2112.5 60.684211 167.5 120 205.5 282 5760 5 64 28.57895 2112.5 60.684211 167.5 120 205.5 283 5760 5 64 32.15789 2112.5 60.684211 167.5 120 205.5 284 5760 5 64 35.73684 2112.5 60.684211 167.5 120 205.5 285 5760 5 64 39.31579 2112.5 60.684211 167.5 120 205.5 286 5760 5 64 42.89474 2112.5 60.684211 167.5 120 205.5 287 5760 5 64 46.47368 2112.5 60.684211 167.5 120 205.5 288 5760 5 64 50.05263 2112.5 60.684211 167.5 120 205.5 289 5760 5 64 53.63158 2112.5 60.684211 167.5 120 205.5 290 5760 5 64 57.21053 2112.5 60.684211 167.5 120 205.5 291 5760 5 64 60.78947 2112.5 60.684211 167.5 120 205.5 292 5760 5 64 64.36842 2112.5 60.684211 167.5 120 205.5 293 5760 5 64 67.94737 2112.5 60.684211 167.5 120 205.5 294 5760 5 64 71.52632 2112.5 60.684211 167.5 120 205.5 295 5760 5 64 75.10526 2112.5 60.684211 167.5 120 205.5 296 5760 5 64 78.68421 2112.5 60.684211 167.5 120 205.5 297 5760 5 64 82.26316 2112.5 60.684211 167.5 120 205.5 298 5760 5 64 85.84211 2112.5 60.684211 167.5 120 205.5 299 5760 5 64 89.42105 2112.5 60.684211 167.5 120 205.5 300 5760 5 64 93.00000 2112.5 60.684211 167.5 120 205.5 301 5760 5 64 25.00000 2112.5 69.947368 167.5 120 205.5 302 5760 5 64 28.57895 2112.5 69.947368 167.5 120 205.5 303 5760 5 64 32.15789 2112.5 69.947368 167.5 120 205.5 304 5760 5 64 35.73684 2112.5 69.947368 167.5 120 205.5 305 5760 5 64 39.31579 2112.5 69.947368 167.5 120 205.5 306 5760 5 64 42.89474 2112.5 69.947368 167.5 120 205.5 307 5760 5 64 46.47368 2112.5 69.947368 167.5 120 205.5 308 5760 5 64 50.05263 2112.5 69.947368 167.5 120 205.5 309 5760 5 64 53.63158 2112.5 69.947368 167.5 120 205.5 310 5760 5 64 57.21053 2112.5 69.947368 167.5 120 205.5 311 5760 5 64 60.78947 2112.5 69.947368 167.5 120 205.5 312 5760 5 64 64.36842 2112.5 69.947368 167.5 120 205.5 313 5760 5 64 67.94737 2112.5 69.947368 167.5 120 205.5 314 5760 5 64 71.52632 2112.5 69.947368 167.5 120 205.5 315 5760 5 64 75.10526 2112.5 69.947368 167.5 120 205.5 316 5760 5 64 78.68421 2112.5 69.947368 167.5 120 205.5 317 5760 5 64 82.26316 2112.5 69.947368 167.5 120 205.5 318 5760 5 64 85.84211 2112.5 69.947368 167.5 120 205.5 319 5760 5 64 89.42105 2112.5 69.947368 167.5 120 205.5 320 5760 5 64 93.00000 2112.5 69.947368 167.5 120 205.5 321 5760 5 64 25.00000 2112.5 79.210526 167.5 120 205.5 322 5760 5 64 28.57895 2112.5 79.210526 167.5 120 205.5 323 5760 5 64 32.15789 2112.5 79.210526 167.5 120 205.5 324 5760 5 64 35.73684 2112.5 79.210526 167.5 120 205.5 325 5760 5 64 39.31579 2112.5 79.210526 167.5 120 205.5 326 5760 5 64 42.89474 2112.5 79.210526 167.5 120 205.5 327 5760 5 64 46.47368 2112.5 79.210526 167.5 120 205.5 328 5760 5 64 50.05263 2112.5 79.210526 167.5 120 205.5 329 5760 5 64 53.63158 2112.5 79.210526 167.5 120 205.5 330 5760 5 64 57.21053 2112.5 79.210526 167.5 120 205.5 331 5760 5 64 60.78947 2112.5 79.210526 167.5 120 205.5 332 5760 5 64 64.36842 2112.5 79.210526 167.5 120 205.5 333 5760 5 64 67.94737 2112.5 79.210526 167.5 120 205.5 334 5760 5 64 71.52632 2112.5 79.210526 167.5 120 205.5 335 5760 5 64 75.10526 2112.5 79.210526 167.5 120 205.5 336 5760 5 64 78.68421 2112.5 79.210526 167.5 120 205.5 337 5760 5 64 82.26316 2112.5 79.210526 167.5 120 205.5 338 5760 5 64 85.84211 2112.5 79.210526 167.5 120 205.5 339 5760 5 64 89.42105 2112.5 79.210526 167.5 120 205.5 340 5760 5 64 93.00000 2112.5 79.210526 167.5 120 205.5 341 5760 5 64 25.00000 2112.5 88.473684 167.5 120 205.5 342 5760 5 64 28.57895 2112.5 88.473684 167.5 120 205.5 343 5760 5 64 32.15789 2112.5 88.473684 167.5 120 205.5 344 5760 5 64 35.73684 2112.5 88.473684 167.5 120 205.5 345 5760 5 64 39.31579 2112.5 88.473684 167.5 120 205.5 346 5760 5 64 42.89474 2112.5 88.473684 167.5 120 205.5 347 5760 5 64 46.47368 2112.5 88.473684 167.5 120 205.5 348 5760 5 64 50.05263 2112.5 88.473684 167.5 120 205.5 349 5760 5 64 53.63158 2112.5 88.473684 167.5 120 205.5 350 5760 5 64 57.21053 2112.5 88.473684 167.5 120 205.5 351 5760 5 64 60.78947 2112.5 88.473684 167.5 120 205.5 352 5760 5 64 64.36842 2112.5 88.473684 167.5 120 205.5 353 5760 5 64 67.94737 2112.5 88.473684 167.5 120 205.5 354 5760 5 64 71.52632 2112.5 88.473684 167.5 120 205.5 355 5760 5 64 75.10526 2112.5 88.473684 167.5 120 205.5 356 5760 5 64 78.68421 2112.5 88.473684 167.5 120 205.5 357 5760 5 64 82.26316 2112.5 88.473684 167.5 120 205.5 358 5760 5 64 85.84211 2112.5 88.473684 167.5 120 205.5 359 5760 5 64 89.42105 2112.5 88.473684 167.5 120 205.5 360 5760 5 64 93.00000 2112.5 88.473684 167.5 120 205.5 361 5760 5 64 25.00000 2112.5 97.736842 167.5 120 205.5 362 5760 5 64 28.57895 2112.5 97.736842 167.5 120 205.5 363 5760 5 64 32.15789 2112.5 97.736842 167.5 120 205.5 364 5760 5 64 35.73684 2112.5 97.736842 167.5 120 205.5 365 5760 5 64 39.31579 2112.5 97.736842 167.5 120 205.5 366 5760 5 64 42.89474 2112.5 97.736842 167.5 120 205.5 367 5760 5 64 46.47368 2112.5 97.736842 167.5 120 205.5 368 5760 5 64 50.05263 2112.5 97.736842 167.5 120 205.5 369 5760 5 64 53.63158 2112.5 97.736842 167.5 120 205.5 370 5760 5 64 57.21053 2112.5 97.736842 167.5 120 205.5 371 5760 5 64 60.78947 2112.5 97.736842 167.5 120 205.5 372 5760 5 64 64.36842 2112.5 97.736842 167.5 120 205.5 373 5760 5 64 67.94737 2112.5 97.736842 167.5 120 205.5 374 5760 5 64 71.52632 2112.5 97.736842 167.5 120 205.5 375 5760 5 64 75.10526 2112.5 97.736842 167.5 120 205.5 376 5760 5 64 78.68421 2112.5 97.736842 167.5 120 205.5 377 5760 5 64 82.26316 2112.5 97.736842 167.5 120 205.5 378 5760 5 64 85.84211 2112.5 97.736842 167.5 120 205.5 379 5760 5 64 89.42105 2112.5 97.736842 167.5 120 205.5 380 5760 5 64 93.00000 2112.5 97.736842 167.5 120 205.5 381 5760 5 64 25.00000 2112.5 107.000000 167.5 120 205.5 382 5760 5 64 28.57895 2112.5 107.000000 167.5 120 205.5 383 5760 5 64 32.15789 2112.5 107.000000 167.5 120 205.5 384 5760 5 64 35.73684 2112.5 107.000000 167.5 120 205.5 385 5760 5 64 39.31579 2112.5 107.000000 167.5 120 205.5 386 5760 5 64 42.89474 2112.5 107.000000 167.5 120 205.5 387 5760 5 64 46.47368 2112.5 107.000000 167.5 120 205.5 388 5760 5 64 50.05263 2112.5 107.000000 167.5 120 205.5 389 5760 5 64 53.63158 2112.5 107.000000 167.5 120 205.5 390 5760 5 64 57.21053 2112.5 107.000000 167.5 120 205.5 391 5760 5 64 60.78947 2112.5 107.000000 167.5 120 205.5 392 5760 5 64 64.36842 2112.5 107.000000 167.5 120 205.5 393 5760 5 64 67.94737 2112.5 107.000000 167.5 120 205.5 394 5760 5 64 71.52632 2112.5 107.000000 167.5 120 205.5 395 5760 5 64 75.10526 2112.5 107.000000 167.5 120 205.5 396 5760 5 64 78.68421 2112.5 107.000000 167.5 120 205.5 397 5760 5 64 82.26316 2112.5 107.000000 167.5 120 205.5 398 5760 5 64 85.84211 2112.5 107.000000 167.5 120 205.5 399 5760 5 64 89.42105 2112.5 107.000000 167.5 120 205.5 400 5760 5 64 93.00000 2112.5 107.000000 167.5 120 205.5 vh wind humidity temp ibh Min. :5760 Min. :5 Min. :64 Min. :25 Min. :2112 1st Qu.:5760 1st Qu.:5 1st Qu.:64 1st Qu.:42 1st Qu.:2112 Median :5760 Median :5 Median :64 Median :59 Median :2112 Mean :5760 Mean :5 Mean :64 Mean :59 Mean :2112 3rd Qu.:5760 3rd Qu.:5 3rd Qu.:64 3rd Qu.:76 3rd Qu.:2112 Max. :5760 Max. :5 Max. :64 Max. :93 Max. :2112 dpg ibt vis doy Min. :-69 Min. :167.5 Min. :120 Min. :205.5 1st Qu.:-25 1st Qu.:167.5 1st Qu.:120 1st Qu.:205.5 Median : 19 Median :167.5 Median :120 Median :205.5 Mean : 19 Mean :167.5 Mean :120 Mean :205.5 3rd Qu.: 63 3rd Qu.:167.5 3rd Qu.:120 3rd Qu.:205.5 Max. :107 Max. :167.5 Max. :120 Max. :205.5 get.earth.x from model.matrix.earth from predict.earth: x is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of x are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 -69 167.5 120 205.5 2 5760 5 64 28.57895 2112.5 -69 167.5 120 205.5 3 5760 5 64 32.15789 2112.5 -69 167.5 120 205.5 4 5760 5 64 35.73684 2112.5 -69 167.5 120 205.5 5 5760 5 64 39.31579 2112.5 -69 167.5 120 205.5 6 5760 5 64 42.89474 2112.5 -69 167.5 120 205.5 get.earth.x from model.matrix.earth from predict.earth: data after call to model.frame is a 400 by 9 matrix: 1=vh, 2=wind, 3=humidity, 4=temp, 5=ibh, 6=dpg, 7=ibt, 8=vis, 9=doy First few rows of data after call to model.frame are vh wind humidity temp ibh dpg ibt vis doy 1 5760 5 64 25.00000 2112.5 -69 167.5 120 205.5 2 5760 5 64 28.57895 2112.5 -69 167.5 120 205.5 3 5760 5 64 32.15789 2112.5 -69 167.5 120 205.5 4 5760 5 64 35.73684 2112.5 -69 167.5 120 205.5 5 5760 5 64 39.31579 2112.5 -69 167.5 120 205.5 6 5760 5 64 42.89474 2112.5 -69 167.5 120 205.5 predict.earth: bx is a 400 by 15 matrix: 1=(Intercept), 2=h(temp-58), 3=h(58-temp), 4=h(ibh-1069), 5=h(1069-ibh), 6=h(doy-89), 7=h(89-doy), 8=h(humidity-56)*h(temp-58), 9=h(56-humidity)*h(temp-58), 10=h(temp-58)*h(dpg-54), 11=h(temp-58)*h(54-dpg), 12=h(vis-200), 13=h(200-vis), 14=h(wind-7)*h(200-vis), 15=h(7-wind)*h(200-vis) First few rows of bx are (Intercept) h(temp-58) h(58-temp) h(ibh-1069) h(1069-ibh) h(doy-89) [1,] 1 0 33.00000 1043.5 0 116.5 [2,] 1 0 29.42105 1043.5 0 116.5 [3,] 1 0 25.84211 1043.5 0 116.5 [4,] 1 0 22.26316 1043.5 0 116.5 [5,] 1 0 18.68421 1043.5 0 116.5 [6,] 1 0 15.10526 1043.5 0 116.5 h(89-doy) h(humidity-56)*h(temp-58) h(56-humidity)*h(temp-58) [1,] 0 0 0 [2,] 0 0 0 [3,] 0 0 0 [4,] 0 0 0 [5,] 0 0 0 [6,] 0 0 0 h(temp-58)*h(dpg-54) h(temp-58)*h(54-dpg) h(vis-200) h(200-vis) [1,] 0 0 0 80 [2,] 0 0 0 80 [3,] 0 0 0 80 [4,] 0 0 0 80 [5,] 0 0 0 80 [6,] 0 0 0 80 h(wind-7)*h(200-vis) h(7-wind)*h(200-vis) [1,] 0 160 [2,] 0 160 [3,] 0 160 [4,] 0 160 [5,] 0 160 [6,] 0 160 predict.earth: returning earth predictions predict.earth(xgrid, type="response") column "O3" returned length 400 min -9.4412 max 40.35461 value 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.76083 15.82681 18.89278 21.95876 25.02473 28.09071 31.15668 34.22266 37.28863 40.35461 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.67083 15.62132 18.57182 21.52231 24.47281 27.4233 30.3738 33.32429 36.27479 39.22528 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.58082 15.41584 18.25085 21.08587 23.92088 26.7559 29.59091 32.42593 35.26094 38.09596 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.49081 15.21035 17.92989 20.64942 23.36896 26.08849 28.80803 31.52756 34.2471 36.96664 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.40081 15.00486 17.60892 20.21298 22.81703 25.42109 28.02514 30.6292 33.23326 35.83731 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.3108 14.79938 17.28795 19.77653 22.26511 24.75368 27.24226 29.73084 32.21941 34.70799 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.22079 14.59389 16.96699 19.34009 21.71318 24.08628 26.45938 28.83247 31.20557 33.57867 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.13079 14.38841 16.64602 18.90364 21.16126 23.41887 25.67649 27.93411 30.19173 32.44934 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 12.04078 14.18292 16.32506 18.46719 20.60933 22.75147 24.89361 27.03574 29.17788 31.32002 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 11.95078 13.97743 16.00409 18.03075 20.05741 22.08406 24.11072 26.13738 28.16404 30.1907 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 11.86077 13.77195 15.68313 17.5943 19.50548 21.41666 23.32784 25.23902 27.15019 29.06137 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 11.77076 13.56646 15.36216 17.15786 18.95356 20.74926 22.54495 24.34065 26.13635 27.93205 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 11.68076 13.36098 15.04119 16.72141 18.40163 20.08185 21.76207 23.44229 25.12251 26.80273 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 11.59075 13.15549 14.72023 16.28497 17.84971 19.41445 20.97919 22.54392 24.10866 25.6734 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 11.2159 12.2997 13.3835 14.4673 15.55109 16.63489 17.71869 18.80249 19.88629 20.97009 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 10.73115 11.193 11.65486 12.11671 12.57856 13.04042 13.50227 13.96412 14.42598 14.88783 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 10.2464 10.08631 9.926214 9.766122 9.606031 9.445939 9.285847 9.125756 8.965664 8.805572 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 9.761646 8.979609 8.197573 7.415536 6.633499 5.851462 5.069425 4.287389 3.505352 2.723315 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 9.276895 7.872913 6.468931 5.064949 3.660967 2.256985 0.8530034 -0.5509785 -1.95496 -3.358942 5.18223 5.744986 6.307743 6.870499 7.433256 7.996012 8.558768 9.121525 9.684281 10.24704 8.792144 6.766216 4.740289 2.714362 0.6884354 -1.337492 -3.363419 -5.389346 -7.415273 -9.4412 O3 Min. :-9.441 1st Qu.: 6.870 Median : 9.684 Mean :12.948 3rd Qu.:17.870 Max. :40.355 ylim 1.315519 37.28863 --plot.degree1(draw.plot=TRUE) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 --plot.degree2(draw.plot=TRUE) persp(wind:vis) theta 145 ylim 1.32 37.3 cex 0.66 persp(humidity:temp) theta -35 ylim 1.32 37.3 cex 0.66 persp(temp:dpg) theta 235 ylim 1.32 37.3 cex 0.66 > > caption <- "test 2 x 2 layout" > dopar(1,1,caption) test 2 x 2 layout > a <- earth(O3 ~ ., data=ozone1, nk=9, pmethod="n", degree=2) > plotmo(a, xlab="", ylab="", caption=caption, trace=-1) # trace=-1 inhibits "grid:" message > > caption <- "test 1 x 1 layout" > dopar(1,1,caption) test 1 x 1 layout > a <- earth(O3 ~ ., data=ozone1, nk=4, pmethod="n", degree=2) > plotmo(a, xlab="", ylab="", caption=caption, trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > > caption <- "test plotmo basic params" > a <- earth(O3 ~ ., data=ozone1, degree=2) > dopar(3,2,caption) test plotmo basic params > set.seed(1) # needed for reproducibility because of sample for rug in plotmo > plotmo(a, do.par=FALSE, degree1=1, nrug=-1, degree2=F, caption=caption, + main="test main", xlab="test xlab", ylab="test ylab", trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > set.seed(1) > plotmo(a, do.par=FALSE, degree1=F, degree2=4, grid.func=mean, col.persp="white", ngrid2=10, phi=40, trace=Trace) > set.seed(1) > plotmo(a, do.par=FALSE, degree1=1, lty.degree1=2, lwd.degree1=4, col.degree1=2, nrug=300, degree2=F, main="nrug=300", trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > set.seed(1) > plotmo(a, do.par=FALSE, degree1=1, nrug=-1, degree2=F, main="nrug=-1", trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > set.seed(1) > plotmo(a, do.par=FALSE, degree1=1, nrug=500, ngrid1=50, degree2=F, main="ngrid1=50 nrug=500", trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > plotmo(a, do.par=FALSE, degree1=NA, degree2=1, phi=60, box=F, r=100) # dots args > > caption <- "test plotmo ylim" > a <- earth(O3 ~ ., data=ozone1, degree=2) > dopar(3,3,caption) test plotmo ylim > plotmo(a, do.par=FALSE, degree1=2:3, degree2=4, caption=caption, xlab="ylim=default", trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > plotmo(a, do.par=FALSE, degree1=2:3, degree2=4, ylim=NA, xlab="ylim=NA", trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > plotmo(a, do.par=FALSE, degree1=2:3, degree2=4, ylim=c(0,20), xlab="ylim=c(0,20)", trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > > # term.plot calls predict.earth with an se parameter, even with termplot(se=FALSE) > > caption <- "basic earth test against termplot" > dopar(4,4,caption) basic earth test against termplot > earth:::make.space.for.caption("test caption1") > a <- earth(O3 ~ ., data=ozone1, degree=2) > plotmo(a, do.par=FALSE, ylim=NA, caption=caption, degree2=FALSE, trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > cat("Ignore two warnings: predict.earth ignored argument \"se.fit\"\n") Ignore two warnings: predict.earth ignored argument "se.fit" > termplot(a) Warning: predict.earth ignored unrecognized argument "se.fit" > > caption <- "test change order of earth predictors and cex" > dopar(4,4,caption) test change order of earth predictors and cex > a <- earth(doy ~ humidity + temp + wind, data=ozone1, degree=2) > plotmo(a, do.par=FALSE, ylim=NA, caption=caption, degree2=c(1,2), trace=Trace, cex=1) grid: humidity temp wind 64 62 5 > termplot(a) Warning: predict.earth ignored unrecognized argument "se.fit" > > caption <- "test all1=TRUE" > a <- earth(doy ~ humidity + temp + wind, data=ozone1, degree=2) > plotmo(a, caption=caption, all1=TRUE) grid: humidity temp wind 64 62 5 > caption <- "test all2=TRUE" > print(summary(a)) Call: earth(formula=doy~humidity+temp+wind, data=ozone1, degree=2) coefficients (Intercept) 157.999815 h(humidity-28) 1.697095 h(3-wind) 51.628255 h(28-humidity) * h(temp-60) 1.848360 h(28-humidity) * h(60-temp) 0.970502 h(humidity-28) * h(61-temp) -0.130054 h(humidity-77) * h(49-temp) 3.727939 h(41-humidity) * h(wind-3) -0.943635 Selected 8 of 19 terms, and 3 of 3 predictors Importance: wind, humidity, temp Number of terms at each degree of interaction: 1 2 5 GCV 8498.516 RSS 2498879 GRSq 0.2222847 RSq 0.3028199 > plotmo(a, caption=caption, all2=TRUE) grid: humidity temp wind 64 62 5 > > oz <- ozone1[150:200,c("O3","temp","humidity","ibh")] > a.glob <- earth(O3~temp+humidity, data=oz, degree=2) > ad.glob <- earth(oz[,2:3], oz[,1], degree=2) > func1 <- function() + { + caption <- "test environments and finding the correct data" + dopar(4,4,caption) + + plotmo(a.glob, do.par=FALSE, main="a.glob oz", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + mtext(caption, outer=TRUE, font=2, line=1.5, cex=1) + + plotmo(ad.glob, do.par=FALSE, main="ad.glob oz", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + a <- earth(O3~temp+humidity, data=oz, degree=2) + plotmo(a, do.par=FALSE, main="a oz", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + ad <- earth(oz[,2:3], oz[,1], degree=2) + plotmo(ad, do.par=FALSE, main="ad oz", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + oz.org <- oz + oz10 <- 10 * oz # multiply by 10 so we can see by the axis labels if right data is being used + oz <- oz10 # oz is now local to this function, but multiplied by 10 + a.oz10 <- earth(O3~temp+humidity, data=oz, degree=2) + a.oz10.keep <- earth(O3~temp+humidity, data=oz, degree=2, keepxy=TRUE) + plotmo(a.oz10, do.par=FALSE, main="a oz10", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + ad.oz10 <- earth(oz[,2:3], oz[,1], degree=2) + ad.oz10.keep <- earth(oz[,2:3], oz[,1], degree=2, keepxy=TRUE) + plotmo(ad.oz10, do.par=FALSE, main="ad oz10", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + func2 <- function() { + a.func <- earth(O3~temp+humidity, data=oz10, degree=2) + plotmo(a.func, do.par=FALSE, main="a.func oz10", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + ad.func <- earth(oz10[,2:3], oz10[,1], degree=2) + plotmo(ad.func, do.par=FALSE, main="ad.func oz10", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + caption <- "test environments and finding the correct data, continued" + dopar(4,4,caption) + + oz <- .1 * oz.org + a.func <- earth(O3~temp+humidity, data=oz, degree=2) + plotmo(a.func, do.par=FALSE, main="a.func oz.1", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + ad.func <- earth(oz[,2:3], oz[,1], degree=2) + plotmo(ad.func, do.par=FALSE, main="ad.func oz.1", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + plotmo(a.oz10.keep, do.par=FALSE, main="func1:a.oz10.keep", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + plotmo(ad.oz10.keep, do.par=FALSE, main="func1:ad.oz10.keep", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20) + + try(plotmo(a.oz10, do.par=FALSE, main="func1:a.oz10", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20, do.par=FALSE)) + + cat("Expect error msg (because get.plotmo.x calculated using oz.1 i.e. func2.oz)\n") + try(plotmo(ad.oz10, do.par=FALSE, main="func1:ad.oz10", + degree1=1, all2=1, degree2=1, type2="im", trace=T, + col.response=3, pch.response=20)) + } + func2() + + y <- 3:11 + x1 <- c(1,3,2,4,5,6,6,6,6) + x2 <- c(2,3,4,5,6,7,8,9,10) + frame <- data.frame(y=y, x1=x1, x2=x2) + foo <- function() + { + lm.18.out <- lm(y~x1+x2) + x1[2] <- 18 + y[3] <- 19 + frame <- data.frame(y=y, x1=x1, x2=x2) + list(lm.18.out = lm.18.out, + lm.18 = lm(y~x1+x2), + lm.18.keep = lm(y~x1+x2, x=TRUE, y=TRUE), + lm.18.frame = lm(y~x1+x2, data=frame)) + } + temp <- foo() + lm.18.out <- temp$lm.18.out + lm.18 <- temp$lm.18 + lm.18.keep <- temp$lm.18.keep + lm.18.frame <- temp$lm.18.frame + + # following should all use the x1 and y inside foo + + cat("==lm.18.out\n") + plotmo(lm.18.out, trace=1, main="lm.18.out", + do.par=FALSE, degree1=1, clip=FALSE, ylim=c(0,20), + col.response=2, pch.response=20) + + cat("==lm.18\n") + plotmo(lm.18, trace=1, main="lm.18", + do.par=FALSE, degree1=1, clip=FALSE, ylim=c(0,20), + col.response=2, pch.response=20) + + cat("==lm.18.keep\n") + plotmo(lm.18.keep, trace=1, main="lm.18.keep", + do.par=FALSE, degree1=1, clip=FALSE, ylim=c(0,20), + col.response=2, pch.response=20) + + cat("==lm.18.frame\n") + plotmo(lm.18.frame, trace=1, main="lm.18.frame", + do.par=FALSE, degree1=1, clip=FALSE, ylim=c(0,20), + col.response=2, pch.response=20) + } > func1() test environments and finding the correct data --get.plotmo.x for earth object get.data.for.formula: using x from "oz" passed to earth got x with colnames from object$call$formula x[51,2]: temp humidity 150 48 81 151 59 63 152 67 58 ... 66 68 200 79 65 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object get.data.for.formula: using y from "oz" passed to earth got y from object$call$formula get.plotmo.y returned length 51 min 2 max 34 value 2 12 22 17 26 27 14 11 23 26 ... clip.limits 2 34 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 48 68 2 59 68 3 65 68 ... 66 68 27 93 68 predict.earth(xgrid, type="response") column "O3" returned length 27 min 16.53226 max 32.24305 value 27.9325 23.75241 21.47237 21.09236 20.71235 20.33234 19.57233 18.81231 18.4323 18.0523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 48.00000 33 2 50.36842 33 3 52.73684 33 ... 55.10526 33 400 93.00000 90 predict.earth(xgrid, type="response") column "O3" returned length 400 min -30.61358 max 34.72349 value 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 ... ylim 2 34 grid: temp humidity 80 68 --get.plotmo.x for earth object got x with colnames from object$call$x x[51,2]: temp humidity 150 48 81 151 59 63 152 67 58 ... 66 68 200 79 65 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object got y from object$call$y get.plotmo.y returned length 51 min 2 max 34 value 2 12 22 17 26 27 14 11 23 26 ... clip.limits 2 34 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 48 68 2 59 68 3 65 68 ... 66 68 27 93 68 predict.earth(xgrid, type="response") column "oz[,1]" returned length 27 min 16.53226 max 32.24305 value 27.9325 23.75241 21.47237 21.09236 20.71235 20.33234 19.57233 18.81231 18.4323 18.0523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 48.00000 33 2 50.36842 33 3 52.73684 33 ... 55.10526 33 400 93.00000 90 predict.earth(xgrid, type="response") column "oz[,1]" returned length 400 min -30.61358 max 34.72349 value 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 ... ylim 2 34 grid: temp humidity 80 68 --get.plotmo.x for earth object get.data.for.formula: using x from "oz" passed to earth got x with colnames from object$call$formula x[51,2]: temp humidity 150 48 81 151 59 63 152 67 58 ... 66 68 200 79 65 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object get.data.for.formula: using y from "oz" passed to earth got y from object$call$formula get.plotmo.y returned length 51 min 2 max 34 value 2 12 22 17 26 27 14 11 23 26 ... clip.limits 2 34 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 48 68 2 59 68 3 65 68 ... 66 68 27 93 68 predict.earth(xgrid, type="response") column "O3" returned length 27 min 16.53226 max 32.24305 value 27.9325 23.75241 21.47237 21.09236 20.71235 20.33234 19.57233 18.81231 18.4323 18.0523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 48.00000 33 2 50.36842 33 3 52.73684 33 ... 55.10526 33 400 93.00000 90 predict.earth(xgrid, type="response") column "O3" returned length 400 min -30.61358 max 34.72349 value 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 ... ylim 2 34 grid: temp humidity 80 68 --get.plotmo.x for earth object got x with colnames from object$call$x x[51,2]: temp humidity 150 48 81 151 59 63 152 67 58 ... 66 68 200 79 65 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object got y from object$call$y get.plotmo.y returned length 51 min 2 max 34 value 2 12 22 17 26 27 14 11 23 26 ... clip.limits 2 34 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 48 68 2 59 68 3 65 68 ... 66 68 27 93 68 predict.earth(xgrid, type="response") column "oz[,1]" returned length 27 min 16.53226 max 32.24305 value 27.9325 23.75241 21.47237 21.09236 20.71235 20.33234 19.57233 18.81231 18.4323 18.0523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 48.00000 33 2 50.36842 33 3 52.73684 33 ... 55.10526 33 400 93.00000 90 predict.earth(xgrid, type="response") column "oz[,1]" returned length 400 min -30.61358 max 34.72349 value 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 14.25222 ... ylim 2 34 grid: temp humidity 80 68 --get.plotmo.x for earth object get.data.for.formula: using x from "oz" passed to earth got x with colnames from object$call$formula x[51,2]: temp humidity 150 480 810 151 590 630 152 670 580 ... 660 680 200 790 650 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object get.data.for.formula: using y from "oz" passed to earth got y from object$call$formula get.plotmo.y returned length 51 min 20 max 340 value 20 120 220 170 260 270 140 110 230 260 ... clip.limits 20 340 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 480 680 2 590 680 3 650 680 ... 660 680 27 930 680 predict.earth(xgrid, type="response") column "O3" returned length 27 min 165.3226 max 322.4305 value 279.325 237.5241 214.7237 210.9236 207.1235 203.3234 195.7233 188.1231 184.323 180.523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 480.0000 330 2 503.6842 330 3 527.3684 330 ... 551.0526 330 400 930.0000 900 predict.earth(xgrid, type="response") column "O3" returned length 400 min -306.1358 max 347.2349 value 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 ... ylim 20 340 grid: temp humidity 800 680 --get.plotmo.x for earth object got x with colnames from object$call$x x[51,2]: temp humidity 150 480 810 151 590 630 152 670 580 ... 660 680 200 790 650 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object got y from object$call$y get.plotmo.y returned length 51 min 20 max 340 value 20 120 220 170 260 270 140 110 230 260 ... clip.limits 20 340 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 480 680 2 590 680 3 650 680 ... 660 680 27 930 680 predict.earth(xgrid, type="response") column "oz[,1]" returned length 27 min 165.3226 max 322.4305 value 279.325 237.5241 214.7237 210.9236 207.1235 203.3234 195.7233 188.1231 184.323 180.523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 480.0000 330 2 503.6842 330 3 527.3684 330 ... 551.0526 330 400 930.0000 900 predict.earth(xgrid, type="response") column "oz[,1]" returned length 400 min -306.1358 max 347.2349 value 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 ... ylim 20 340 grid: temp humidity 800 680 --get.plotmo.x for earth object get.data.for.formula: using x from "oz10" passed to earth got x with colnames from object$call$formula x[51,2]: temp humidity 150 480 810 151 590 630 152 670 580 ... 660 680 200 790 650 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object get.data.for.formula: using y from "oz10" passed to earth got y from object$call$formula get.plotmo.y returned length 51 min 20 max 340 value 20 120 220 170 260 270 140 110 230 260 ... clip.limits 20 340 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 480 680 2 590 680 3 650 680 ... 660 680 27 930 680 predict.earth(xgrid, type="response") column "O3" returned length 27 min 165.3226 max 322.4305 value 279.325 237.5241 214.7237 210.9236 207.1235 203.3234 195.7233 188.1231 184.323 180.523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 480.0000 330 2 503.6842 330 3 527.3684 330 ... 551.0526 330 400 930.0000 900 predict.earth(xgrid, type="response") column "O3" returned length 400 min -306.1358 max 347.2349 value 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 ... ylim 20 340 grid: temp humidity 800 680 --get.plotmo.x for earth object got x with colnames from object$call$x x[51,2]: temp humidity 150 480 810 151 590 630 152 670 580 ... 660 680 200 790 650 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object got y from object$call$y get.plotmo.y returned length 51 min 20 max 340 value 20 120 220 170 260 270 140 110 230 260 ... clip.limits 20 340 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 480 680 2 590 680 3 650 680 ... 660 680 27 930 680 predict.earth(xgrid, type="response") column "oz10[,1]" returned length 27 min 165.3226 max 322.4305 value 279.325 237.5241 214.7237 210.9236 207.1235 203.3234 195.7233 188.1231 184.323 180.523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 480.0000 330 2 503.6842 330 3 527.3684 330 ... 551.0526 330 400 930.0000 900 predict.earth(xgrid, type="response") column "oz10[,1]" returned length 400 min -306.1358 max 347.2349 value 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 ... ylim 20 340 grid: temp humidity 800 680 test environments and finding the correct data, continued --get.plotmo.x for earth object get.data.for.formula: using x from "oz" passed to earth got x with colnames from object$call$formula x[51,2]: temp humidity 150 4.8 8.1 151 5.9 6.3 152 6.7 5.8 ... 6.6 6.8 200 7.9 6.5 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object get.data.for.formula: using y from "oz" passed to earth got y from object$call$formula get.plotmo.y returned length 51 min 0.2 max 3.4 value 0.2 1.2 2.2 1.7 2.6 2.7 1.4 1.1 2.3 2.6 ... clip.limits 0.2 3.4 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 4.8 6.8 2 5.9 6.8 3 6.5 6.8 ... 6.6 6.8 27 9.3 6.8 predict.earth(xgrid, type="response") column "O3" returned length 27 min 1.653226 max 3.224305 value 2.79325 2.375241 2.147237 2.109236 2.071235 2.033234 1.957233 1.881231 1.84323 1.80523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 4.800000 3.3 2 5.036842 3.3 3 5.273684 3.3 ... 5.510526 3.3 400 9.300000 9.0 predict.earth(xgrid, type="response") column "O3" returned length 400 min -3.061358 max 3.472349 value 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 ... ylim 0.2 3.4 grid: temp humidity 8 6.8 --get.plotmo.x for earth object got x with colnames from object$call$x x[51,2]: temp humidity 150 4.8 8.1 151 5.9 6.3 152 6.7 5.8 ... 6.6 6.8 200 7.9 6.5 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object got y from object$call$y get.plotmo.y returned length 51 min 0.2 max 3.4 value 0.2 1.2 2.2 1.7 2.6 2.7 1.4 1.1 2.3 2.6 ... clip.limits 0.2 3.4 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 4.8 6.8 2 5.9 6.8 3 6.5 6.8 ... 6.6 6.8 27 9.3 6.8 predict.earth(xgrid, type="response") column "oz[,1]" returned length 27 min 1.653226 max 3.224305 value 2.79325 2.375241 2.147237 2.109236 2.071235 2.033234 1.957233 1.881231 1.84323 1.80523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 4.800000 3.3 2 5.036842 3.3 3 5.273684 3.3 ... 5.510526 3.3 400 9.300000 9.0 predict.earth(xgrid, type="response") column "oz[,1]" returned length 400 min -3.061358 max 3.472349 value 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 1.425222 ... ylim 0.2 3.4 grid: temp humidity 8 6.8 --get.plotmo.x for earth object get.data.for.formula: using x from object$data got x with colnames from object$call$formula x[51,2]: temp humidity 150 480 810 151 590 630 152 670 580 ... 660 680 200 790 650 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object get.data.for.formula: using y from object$data got y from object$call$formula get.plotmo.y returned length 51 min 20 max 340 value 20 120 220 170 260 270 140 110 230 260 ... clip.limits 20 340 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 480 680 2 590 680 3 650 680 ... 660 680 27 930 680 predict.earth(xgrid, type="response") column "O3" returned length 27 min 165.3226 max 322.4305 value 279.325 237.5241 214.7237 210.9236 207.1235 203.3234 195.7233 188.1231 184.323 180.523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 480.0000 330 2 503.6842 330 3 527.3684 330 ... 551.0526 330 400 930.0000 900 predict.earth(xgrid, type="response") column "O3" returned length 400 min -306.1358 max 347.2349 value 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 ... ylim 20 340 grid: temp humidity 800 680 --get.plotmo.x for earth object got x with colnames from object$x x[51,2]: temp humidity 150 480 810 151 590 630 152 670 580 ... 660 680 200 790 650 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object got y from object$y get.plotmo.y column "oz[,1]" returned length 51 min 20 max 340 value 20 120 220 170 260 270 140 110 230 260 ... clip.limits 20 340 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 480 680 2 590 680 3 650 680 ... 660 680 27 930 680 predict.earth(xgrid, type="response") column "oz[,1]" returned length 27 min 165.3226 max 322.4305 value 279.325 237.5241 214.7237 210.9236 207.1235 203.3234 195.7233 188.1231 184.323 180.523 ... --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 480.0000 330 2 503.6842 330 3 527.3684 330 ... 551.0526 330 400 930.0000 900 predict.earth(xgrid, type="response") column "oz[,1]" returned length 400 min -306.1358 max 347.2349 value 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 ... ylim 20 340 grid: temp humidity 800 680 Error in plotmo(a.oz10, do.par = FALSE, main = "func1:a.oz10", degree1 = 1, : formal argument "do.par" matched by multiple actual arguments Expect error msg (because get.plotmo.x calculated using oz.1 i.e. func2.oz) --get.plotmo.x for earth object got x with colnames from object$call$x x[51,2]: temp humidity 150 4.8 8.1 151 5.9 6.3 152 6.7 5.8 ... 6.6 6.8 200 7.9 6.5 nlevels: temp=27 humidity=27 --get.plotmo.y for earth object got y from object$call$y get.plotmo.y returned length 51 min 0.2 max 3.4 value 0.2 1.2 2.2 1.7 2.6 2.7 1.4 1.1 2.3 2.6 ... clip.limits 0.2 3.4 --plot.degree1(draw.plot=FALSE) plotmo.predict(type="response") for degree1 plot "temp" with newdata[27,2]: temp humidity 1 4.8 6.8 2 5.9 6.8 3 6.5 6.8 ... 6.6 6.8 27 9.3 6.8 predict.earth(xgrid, type="response") column "oz[,1]" returned length 27 min 142.5222 max 142.5222 value 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 ... Warning: predicted values in the "temp" graph are out of ylim=(0.2, 3.4). Use clip=FALSE to make this warning go away. --plot.degree2(draw.plot=FALSE) plotmo.predict(type="response") for degree2 plot "temp:humidity" with newdata[400,2]: temp humidity 1 4.800000 3.3 2 5.036842 3.3 3 5.273684 3.3 ... 5.510526 3.3 400 9.300000 9.0 predict.earth(xgrid, type="response") column "oz[,1]" returned length 400 min 142.5222 max 142.5222 value 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 142.5222 ... Error : all predicted values are out of the range of the original response, try clip=FALSE ==lm.18.out --get.plotmo.x for lm object got x with colnames from object$call$formula x[9,2]: x1 x2 1 1 2 2 18 3 3 2 4 ... 4 5 9 6 10 nlevels: x1=6 x2=9 --get.plotmo.y for lm object got y from object$call$formula get.plotmo.y returned length 9 min 3 max 19 value 3 4 19 6 7 8 9 10 11 ylim NA NA --plot.degree1(draw.plot=TRUE) grid: x1 x2 6 6 plotmo.predict(type="response") for degree1 plot "x1" with newdata[6,2]: x1 x2 1 1 6 2 2 6 3 4 6 ... 5 6 6 18 6 predict.lm(xgrid, type="response") returned length 6 min 7 max 7 value 7 7 7 7 7 7 ==lm.18 --get.plotmo.x for lm object got x with colnames from object$call$formula x[9,2]: x1 x2 1 1 2 2 18 3 3 2 4 ... 4 5 9 6 10 nlevels: x1=6 x2=9 --get.plotmo.y for lm object got y from object$call$formula get.plotmo.y returned length 9 min 3 max 19 value 3 4 19 6 7 8 9 10 11 ylim NA NA --plot.degree1(draw.plot=TRUE) grid: x1 x2 6 6 plotmo.predict(type="response") for degree1 plot "x1" with newdata[6,2]: x1 x2 1 1 6 2 2 6 3 4 6 ... 5 6 6 18 6 predict.lm(xgrid, type="response") returned length 6 min 4.830107 max 10.10783 value 10.10783 9.797372 9.176464 8.86601 8.555556 4.830107 ==lm.18.keep --get.plotmo.x for lm object got x with colnames from object$x x[9,2]: x1 x2 1 1 2 2 18 3 3 2 4 ... 4 5 9 6 10 nlevels: x1=6 x2=9 --get.plotmo.y for lm object got y from object$y get.plotmo.y returned length 9 min 3 max 19 value 3 4 19 6 7 8 9 10 11 ylim NA NA --plot.degree1(draw.plot=TRUE) grid: x1 x2 6 6 plotmo.predict(type="response") for degree1 plot "x1" with newdata[6,2]: x1 x2 1 1 6 2 2 6 3 4 6 ... 5 6 6 18 6 predict.lm(xgrid, type="response") returned length 6 min 4.830107 max 10.10783 value 10.10783 9.797372 9.176464 8.86601 8.555556 4.830107 ==lm.18.frame --get.plotmo.x for lm object get.data.for.formula: using x from "frame" passed to lm got x with colnames from object$call$formula x[9,2]: x1 x2 1 1 2 2 18 3 3 2 4 ... 4 5 9 6 10 nlevels: x1=6 x2=9 --get.plotmo.y for lm object get.data.for.formula: using y from "frame" passed to lm got y from object$call$formula get.plotmo.y returned length 9 min 3 max 19 value 3 4 19 6 7 8 9 10 11 ylim NA NA --plot.degree1(draw.plot=TRUE) grid: x1 x2 6 6 plotmo.predict(type="response") for degree1 plot "x1" with newdata[6,2]: x1 x2 1 1 6 2 2 6 3 4 6 ... 5 6 6 18 6 predict.lm(xgrid, type="response") returned length 6 min 4.830107 max 10.10783 value 10.10783 9.797372 9.176464 8.86601 8.555556 4.830107 > > caption <- "test earth formula versus x,y model" > dopar(4,4,caption) test earth formula versus x,y model > mtext(caption, outer=TRUE, font=2, line=1.5, cex=1) > a <- earth(O3 ~ ., data=ozone1, degree=2) > plotmo(a, do.par=FALSE, caption=caption, trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > a <- earth(ozone1[, -1], ozone1[,1], degree=2) > plotmo(a, do.par=FALSE, trace=Trace) grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > > # single predictor > caption <- "test earth(O3~wind, data=ozone1, degree=2), single predictor" > dopar(2,2,caption) test earth(O3~wind, data=ozone1, degree=2), single predictor > a <- earth(O3~wind, data=ozone1, degree=2) > plotmo(a, trace=Trace) grid: wind 5 > > caption = "se=2, earth(doy~humidity+temp+wind, data=ozone1) versus termplot (expect no se lines)" > dopar(3,2,caption) se=2, earth(doy~humidity+temp+wind, data=ozone1) versus termplot (expect no se lines) > mtext(caption, outer=TRUE, font=2, line=1.5, cex=1) > a <- earth(doy~humidity + temp + wind, data=ozone1, degree=2) > cat("Ignore warning: predict.earth ignored argument \"se\"\n") Ignore warning: predict.earth ignored argument "se" > termplot(a) Warning: predict.earth ignored unrecognized argument "se.fit" > cat("Ignore two warnings: predict.earth ignored argument \"se.fit\"\n") Ignore two warnings: predict.earth ignored argument "se.fit" > plotmo(a, se=2, do.par=FALSE, ylim=NA, degree2=c(1:2), clip=FALSE, caption=caption, trace=Trace) grid: humidity temp wind 64 62 5 Warning: predict.earth ignored unrecognized argument "se.fit" Warning: predict.earth ignored unrecognized argument "se.fit" > > # test fix to bug reported by Joe Retzer, FIXED Dec 7, 2007 > N <- 650 > set.seed(2007) > q_4 <- runif(N, -1, 1) > q_2102 <- runif(N, -1, 1) > q_2104 <- runif(N, -1, 1) > q_3105 <- runif(N, -1, 1) > q_3106 <- runif(N, -1, 1) > q_4104 <- runif(N, -1, 1) > q_6101 <- runif(N, -1, 1) > q_6103 <- runif(N, -1, 1) > q_7104 <- runif(N, -1, 1) > q_3109 <- runif(N, -1, 1) > q_4103 <- runif(N, -1, 1) > q_2111 <- runif(N, -1, 1) > q_3107 <- runif(N, -1, 1) > q_3101 <- runif(N, -1, 1) > q_3104 <- runif(N, -1, 1) > q_7107 <- runif(N, -1, 1) > depIndex <- sin(1.0 * q_4 + rnorm(650, sd=.8)) + sin(1.8 * q_2102 + rnorm(650, sd=.8)) + sin(1.3 * q_2104 + rnorm(650, sd=.8)) + sin(1.4 * q_3105 + rnorm(650, sd=.8)) + + sin(1.5 * q_3106 + rnorm(650, sd=.8)) + sin(1.6 * q_4104 + rnorm(650, sd=.8)) + sin(1.8 * q_6101 + rnorm(650, sd=.8)) + sin(1.8 * q_6103 + rnorm(650, sd=.8)) + + sin(1.9 * q_7104 + rnorm(650, sd=.8)) + sin(2.0 * q_3109 + rnorm(650, sd=.8)) > > regDatCWD <- as.data.frame(cbind(depIndex, q_4, q_2102, q_2104, q_3105, q_3106, q_4104, q_6101, q_6103, q_7104, q_3109, q_4103, q_2111, q_3107, q_3101, q_3104, q_7107)) > earthobj <- earth(depIndex ~ q_4+q_2102+q_2104+q_3105+q_3106+q_4104+q_6101+q_6103+q_7104+q_3109+q_4103+q_2111+q_3107+q_3101+q_3104+q_7107, data=regDatCWD) > print(summary(earthobj, digits = 2)) Call: earth(formula=depIndex~q_4+q_2102+q_2104+q_3105+q_3106+ q_4104+q_6101+q_6103+q_7104+q_3109+q_4103+q_2111+ q_3107+q_3101+q_3104+q_7107, data=regDatCWD) coefficients (Intercept) 1.5 h(q_4-0.82106) -6.9 h(0.82106-q_4) -1.0 h(q_2102- -0.683071) 1.2 h(0.814086-q_2104) -0.9 h(0.836135-q_3105) -0.7 h(0.495726-q_3106) -0.9 h(q_4104- -0.668481) 1.0 h(0.484017-q_6101) -1.1 h(0.915239-q_6103) -1.1 h(q_7104- -0.600984) 1.4 h(q_7104-0.547527) -2.0 h(q_3109- -0.166017) 1.1 h(-0.166017-q_3109) -0.9 h(q_2111-0.975377) 112.9 h(-0.676502-q_3107) 2.2 h(q_7107- -0.672598) 0.3 Selected 17 of 31 terms, and 13 of 16 predictors Importance: q_6103, q_4104, q_2102, q_7104, q_3109, q_6101, q_2104, q_4, ... Number of terms at each degree of interaction: 1 16 (additive model) GCV 2.5 RSS 1451 GRSq 0.54 RSq 0.58 > plotmo(earthobj) grid: q_4 q_2102 q_2104 q_3105 q_3106 q_4104 0.05726625 0.01725001 0.004659335 -0.01826179 -0.00913319 0.01401429 q_6101 q_6103 q_7104 q_3109 q_4103 q_2111 -0.04790454 0.03681165 0.01827148 -0.09899272 -0.0623349 0.01007481 q_3107 q_3101 q_3104 q_7107 -0.02481171 -0.07733527 -0.003053319 0.02821214 > > # long predictor names > > a.rather.long.in.fact.very.long.name.q_4 <- q_4 > a.rather.long.in.fact.very.long.name.q_2102 <- q_2102 > a.rather.long.in.fact.very.long.name.q_2104 <- q_2104 > a.rather.long.in.fact.very.long.name.q_3105 <- q_3105 > a.rather.long.in.fact.very.long.name.q_3106 <- q_3106 > a.rather.long.in.fact.very.long.name.q_4104 <- q_4104 > a.rather.long.in.fact.very.long.name.q_6101 <- q_6101 > a.rather.long.in.fact.very.long.name.q_6103 <- q_6103 > a.rather.long.in.fact.very.long.name.q_7104 <- q_7104 > a.rather.long.in.fact.very.long.name.q_3109 <- q_3109 > a.rather.long.in.fact.very.long.name.q_4103 <- q_4103 > a.rather.long.in.fact.very.long.name.q_2111 <- q_2111 > a.rather.long.in.fact.very.long.name.q_3107 <- q_3107 > a.rather.long.in.fact.very.long.name.q_3101 <- q_3101 > a.rather.long.in.fact.very.long.name.q_3104 <- q_3104 > a.rather.long.in.fact.very.long.name.q_7107 <- q_7107 > a.rather.long.in.fact.very.long.name.for.the.response <- depIndex > a.rather.long.in.fact.very.long.name.for.the.dataframe <- + as.data.frame(cbind( + a.rather.long.in.fact.very.long.name.for.the.response, + a.rather.long.in.fact.very.long.name.q_4, + a.rather.long.in.fact.very.long.name.q_2102, + a.rather.long.in.fact.very.long.name.q_2104, + a.rather.long.in.fact.very.long.name.q_3105, + a.rather.long.in.fact.very.long.name.q_3106, + a.rather.long.in.fact.very.long.name.q_4104, + a.rather.long.in.fact.very.long.name.q_6101, + a.rather.long.in.fact.very.long.name.q_6103, + a.rather.long.in.fact.very.long.name.q_7104, + a.rather.long.in.fact.very.long.name.q_3109, + a.rather.long.in.fact.very.long.name.q_4103, + a.rather.long.in.fact.very.long.name.q_2111, + a.rather.long.in.fact.very.long.name.q_3107, + a.rather.long.in.fact.very.long.name.q_3101, + a.rather.long.in.fact.very.long.name.q_3104, + a.rather.long.in.fact.very.long.name.q_7107)) > > a.rather.long.in.fact.very.long.name.for.the.modelA <- + earth(a.rather.long.in.fact.very.long.name.for.the.response ~ + a.rather.long.in.fact.very.long.name.q_4 + + a.rather.long.in.fact.very.long.name.q_2102 + + a.rather.long.in.fact.very.long.name.q_2104 + + a.rather.long.in.fact.very.long.name.q_3105 + + a.rather.long.in.fact.very.long.name.q_3106 + + a.rather.long.in.fact.very.long.name.q_4104 + + a.rather.long.in.fact.very.long.name.q_6101 + + a.rather.long.in.fact.very.long.name.q_6103 + + a.rather.long.in.fact.very.long.name.q_7104 + + a.rather.long.in.fact.very.long.name.q_3109 + + a.rather.long.in.fact.very.long.name.q_4103 + + a.rather.long.in.fact.very.long.name.q_2111 + + a.rather.long.in.fact.very.long.name.q_3107 + + a.rather.long.in.fact.very.long.name.q_3101 + + a.rather.long.in.fact.very.long.name.q_3104 + + a.rather.long.in.fact.very.long.name.q_7107, + data = a.rather.long.in.fact.very.long.name.for.the.dataframe, minspan=-1) > print(summary(a.rather.long.in.fact.very.long.name.for.the.modelA, digits = 2)) Call: earth(formula=a.rather.long.in.fact.very.long.name.for.the.response~ a.rather.long.in.fact.very.long.name.q_4+a.rather.long.in.fact.very.long.name.q_2102+ a.rather.long.in.fact.very.long.name.q_2104+a.rather.long.in.fact.very.long.name.q_3105+ a.rather.long.in.fact.very.long.name.q_3106+a.rather.long.in.fact.very.long.name.q_4104+ a.rather.long.in.fact.very.long.name.q_6101+a.rather.long.in.fact.very.long.name.q_6103+ a.rather.long.in.fact.very.long.name.q_7104+a.rather.long.in.fact.very.long.name.q_3109+ a.rather.long.in.fact.very.long.name.q_4103+a.rather.long.in.fact.very.long.name.q_2111+ a.rather.long.in.fact.very.long.name.q_3107+a.rather.long.in.fact.very.long.name.q_3101+... coefficients (Intercept) -1.17 h(a.rather.long.in.fact.very.long.name.q_4-0.791129) -5.90 h(0.791129-a.rather.long.in.fact.very.long.name.q_4) -1.00 h(a.rather.long.in.fact.very.long.name.q_2102- -0.682452) 1.20 h(0.833322-a.rather.long.in.fact.very.long.name.q_2104) -0.85 h(0.845208-a.rather.long.in.fact.very.long.name.q_3105) -0.75 h(0.412852-a.rather.long.in.fact.very.long.name.q_3106) -0.99 h(a.rather.long.in.fact.very.long.name.q_4104- -0.684352) 1.01 h(0.484017-a.rather.long.in.fact.very.long.name.q_6101) -1.12 h(0.9131-a.rather.long.in.fact.very.long.name.q_6103) -1.12 h(a.rather.long.in.fact.very.long.name.q_7104- -0.585057) 1.42 h(a.rather.long.in.fact.very.long.name.q_7104-0.542573) -1.91 h(a.rather.long.in.fact.very.long.name.q_3109- -0.163231) 1.05 h(-0.163231-a.rather.long.in.fact.very.long.name.q_3109) -0.97 h(a.rather.long.in.fact.very.long.name.q_2111- -0.65247) 2.02 h(0.69536-a.rather.long.in.fact.very.long.name.q_2111) 1.84 h(-0.696421-a.rather.long.in.fact.very.long.name.q_3107) 2.69 h(a.rather.long.in.fact.very.long.name.q_7107- -0.672466) 0.26 Selected 18 of 31 terms, and 13 of 16 predictors Importance: a.rather.long.in.fact.very.long.name.q_6103, ... Number of terms at each degree of interaction: 1 17 (additive model) GCV 2.5 RSS 1443 GRSq 0.54 RSq 0.58 > plot(a.rather.long.in.fact.very.long.name.for.the.modelA) > plotmo(a.rather.long.in.fact.very.long.name.for.the.modelA) grid: a.rather.long.in.fact.very.long.name.q_4 0.05726625 a.rather.long.in.fact.very.long.name.q_2102 0.01725001 a.rather.long.in.fact.very.long.name.q_2104 0.004659335 a.rather.long.in.fact.very.long.name.q_3105 -0.01826179 a.rather.long.in.fact.very.long.name.q_3106 -0.00913319 a.rather.long.in.fact.very.long.name.q_4104 0.01401429 a.rather.long.in.fact.very.long.name.q_6101 -0.04790454 a.rather.long.in.fact.very.long.name.q_6103 0.03681165 a.rather.long.in.fact.very.long.name.q_7104 0.01827148 a.rather.long.in.fact.very.long.name.q_3109 -0.09899272 a.rather.long.in.fact.very.long.name.q_4103 -0.0623349 a.rather.long.in.fact.very.long.name.q_2111 0.01007481 a.rather.long.in.fact.very.long.name.q_3107 -0.02481171 a.rather.long.in.fact.very.long.name.q_3101 -0.07733527 a.rather.long.in.fact.very.long.name.q_3104 -0.003053319 a.rather.long.in.fact.very.long.name.q_7107 0.02821214 > > a.rather.long.in.fact.very.long.name.for.the.modelC <- + earth(x = a.rather.long.in.fact.very.long.name.for.the.dataframe[,-1], + y = a.rather.long.in.fact.very.long.name.for.the.response, + degree = 3, minspan=-1) > print(summary(a.rather.long.in.fact.very.long.name.for.the.modelC, digits = 2)) Call: earth(x=a.rather.long.in.fact.very.long.name.for.the.dataframe[, -1], y=a.rather.long.in.fact.very.long.name.for.the.response, degree=3, minspan=-1) coefficients (Intercept) 3.1 h(a.rather.long.in.fact.very.long.name.q_4-0.791129) -10.7 h(0.791129-a.rather.long.in.fact.very.long.name.q_4) -1.0 h(a.rather.long.in.fact.very.long.name.q_2102- -0.682452) 1.3 h(0.833322-a.rather.long.in.fact.very.long.name.q_2104) -0.8 h(0.845208-a.rather.long.in.fact.very.long.name.q_3105) -0.8 h(0.412852-a.rather.long.in.fact.very.long.name.q_3106) -0.9 h(a.rather.long.in.fact.very.long.name.q_4104- -0.684352) 1.0 h(0.484017-a.rather.long.in.fact.very.long.name.q_6101) -1.1 h(0.9131-a.rather.long.in.fact.very.long.name.q_6103) -1.1 h(0.542573-a.rather.long.in.fact.very.long.name.q_7104) -1.6 h(a.rather.long.in.fact.very.long.name.q_3109- -0.163231) 1.1 h(-0.163231-a.rather.long.in.fact.very.long.name.q_3109) -2.0 h(-0.696421-a.rather.long.in.fact.very.long.name.q_3107) 2.6 h(-0.682452-a.rather.long.in.fact.very.long.name.q_2102) * h(a.rather.long.in.fact.very.long.name.q_3106- -0.133095) 4.0 h(0.542573-a.rather.long.in.fact.very.long.name.q_7104) * h(a.rather.long.in.fact.very.long.name.q_2111- -0.476604) 0.7 h(-0.163231-a.rather.long.in.fact.very.long.name.q_3109) * h(0.822637-a.rather.long.in.fact.very.long.name.q_2111) 1.3 h(a.rather.long.in.fact.very.long.name.q_4-0.898656) * h(0.542573-a.rather.long.in.fact.very.long.name.q_7104) * h(a.rather.long.in.fact.very.long.name.q_2111- -0.476604) 39.4 Selected 18 of 33 terms, and 12 of 16 predictors Importance: a.rather.long.in.fact.very.long.name.q_6103, ... Number of terms at each degree of interaction: 1 13 3 1 GCV 2.5 RSS 1388 GRSq 0.54 RSq 0.6 > plot(a.rather.long.in.fact.very.long.name.for.the.modelC) > plotmo(a.rather.long.in.fact.very.long.name.for.the.modelC) grid: a.rather.long.in.fact.very.long.name.q_4 0.05726625 a.rather.long.in.fact.very.long.name.q_2102 0.01725001 a.rather.long.in.fact.very.long.name.q_2104 0.004659335 a.rather.long.in.fact.very.long.name.q_3105 -0.01826179 a.rather.long.in.fact.very.long.name.q_3106 -0.00913319 a.rather.long.in.fact.very.long.name.q_4104 0.01401429 a.rather.long.in.fact.very.long.name.q_6101 -0.04790454 a.rather.long.in.fact.very.long.name.q_6103 0.03681165 a.rather.long.in.fact.very.long.name.q_7104 0.01827148 a.rather.long.in.fact.very.long.name.q_3109 -0.09899272 a.rather.long.in.fact.very.long.name.q_4103 -0.0623349 a.rather.long.in.fact.very.long.name.q_2111 0.01007481 a.rather.long.in.fact.very.long.name.q_3107 -0.02481171 a.rather.long.in.fact.very.long.name.q_3101 -0.07733527 a.rather.long.in.fact.very.long.name.q_3104 -0.003053319 a.rather.long.in.fact.very.long.name.q_7107 0.02821214 > > data(etitanic) > a <- earth(survived ~ pclass+sex+age, data=etitanic, degree=2) > print(summary(a)) Call: earth(formula=survived~pclass+sex+age, data=etitanic, degree=2) coefficients (Intercept) 0.93220339 pclass3rd -0.45851918 sexmale -0.51079029 pclass2nd * sexmale -0.26610468 pclass3rd * sexmale 0.19376843 sexmale * h(16-age) 0.03221793 sexmale * h(age-25) -0.00471276 Selected 7 of 14 terms, and 4 of 4 predictors Importance: sexmale, pclass3rd, pclass2nd, age Number of terms at each degree of interaction: 1 2 4 GCV 0.144733 RSS 146.7947 GRSq 0.4020269 RSq 0.4190703 > plotmo(a, trace=Trace, caption="plotmo with facs: pclass+sex+age") grid: pclass sex age 1st female 28 > plotmo(a, trace=Trace, caption="plotmo with facs: pclass+sex+age, all1=T, grid=T", all1=T, grid=T) grid: pclass sex age 1st female 28 > plotmo(a, trace=Trace, caption="plotmo with facs: pclass+sex+age, all2=T, grid=\"green\"", all2=T, grid="green") grid: pclass sex age 1st female 28 > plotmo(a, trace=Trace, caption="plotmo with facs: pclass+sex+age, all1=T, all2=T, grid=2:3", all1=T, all2=T, grid=2:3) grid: pclass sex age 1st female 28 > plotmo(a, trace=Trace, clip=FALSE, degree2=FALSE, caption="plotmo (no degree2) with facs: pclass+sex+age") grid: pclass sex age 1st female 28 > plotmo(a, trace=Trace, clip=FALSE, grid.levels=list(pclass="2n", sex="ma"), + caption="plotmo with grid.levels: pclass+sex+age") grid: pclass sex age 2nd male 28 > # in above tests, all degree2 terms use facs > # now build a model with some degree2 term that use facs, some that don't > a <- earth(survived ~ pclass+age+sibsp, data=etitanic, degree=2) > print(summary(a)) Call: earth(formula=survived~pclass+age+sibsp, data=etitanic, degree=2) coefficients (Intercept) 0.75863837 pclass2nd -0.29146432 pclass3rd -0.46635067 pclass2nd * h(18-age) 0.03666191 pclass3rd * h(20-age) 0.02119903 h(18-age) * h(sibsp-2) -0.02049700 h(age-18) * h(3-sibsp) -0.00222502 Selected 7 of 17 terms, and 4 of 4 predictors Importance: pclass3rd, age, sibsp, pclass2nd Number of terms at each degree of interaction: 1 2 4 GCV 0.203801 RSS 206.7041 GRSq 0.1579841 RSq 0.1819833 > plotmo(a, caption="plotmo with mixed fac and non-fac degree2 terms", border=NA) grid: pclass age sibsp 1st 28 0 > plotmo(a, caption="plotmo with mixed fac and non-fac degree2 terms and grid.levels", + grid.levels=list(pclass="2n", age=20), # test partial matching of grid levels, and numeric preds + ticktype="d", nticks=2) grid: pclass age sibsp 2nd 20 0 > > # check detection of illegal grid.levels argument > try(plotmo(a, grid.levels=list(pcla="1", pclass="2"))) # Expect error Error : bad grid.levels argument ("pcla" and "pclass" both match "pclass") > try(plotmo(a, grid.levels=list(pclass="1", pcla="2"))) # Expect error Error : bad grid.levels argument ("pclass" and "pcla" both match "pclass") > try(plotmo(a, grid.levels=list(pcla=1))) # Expect error Error : illegal level for "pcla" in grid.levels (specify factor levels with a string) > try(plotmo(a, grid.levels=list(pcla=c("ab", "cd")))) # Expect error Error : illegal value for pclass in grid.levels > try(plotmo(a, grid.levels=list(pcla=NA))) # Expect error Error : illegal value for pclass in grid.levels > try(plotmo(a, grid.levels=list(pcla=Inf))) # Expect error Error : illegal level for "pcla" in grid.levels (specify factor levels with a string) > try(plotmo(a, grid.levels=list(pcla=9))) # Expect error Error : illegal level for "pcla" in grid.levels (specify factor levels with a string) > try(plotmo(a, grid.levels=list(age="ab"))) # Expect error Error : illegal value for age in grid.levels > try(plotmo(a, grid.levels=list(age=NA))) # Expect error Error : illegal value for age in grid.levels > try(plotmo(a, grid.levels=list(age=Inf))) # Expect error Error : illegal value for age in grid.levels > try(plotmo(a, grid.lev=list(age=list(1,2)))) # Expect error Error : illegal value for age in grid.levels > > # more-or-less repeat above, but with glm models > a <- earth(survived ~ pclass+age+sibsp, data=etitanic, degree=2, glm=list(family=binomial)) > print(summary(a)) Call: earth(formula=survived~pclass+age+sibsp, data=etitanic, glm=list(family=binomial), degree=2) GLM coefficients survived (Intercept) 1.17548326 pclass2nd -1.28653387 pclass3rd -2.09991370 pclass2nd * h(18-age) 0.38059182 pclass3rd * h(20-age) 0.09857349 h(18-age) * h(sibsp-2) -0.13401139 h(age-18) * h(3-sibsp) -0.01084919 Earth selected 7 of 17 terms, and 4 of 4 predictors Importance: pclass3rd, age, sibsp, pclass2nd Number of terms at each degree of interaction: 1 2 4 Earth GCV 0.203801 RSS 206.7041 GRSq 0.1579841 RSq 0.1819833 GLM null.deviance 1414.62 (1045 dof) deviance 1204.995 (1039 dof) iters 7 > plotmo(a, ylim=c(0, 1), caption="plotmo glm with mixed fac and non-fac degree2 terms") grid: pclass age sibsp 1st 28 0 > plotmo(a, ylim=c(0, 1), caption="plotmo glm with mixed fac and non-fac degree2 terms and grid.levels", + grid.levels=list(pcl="2nd")) # test partial matching of variable name in grid levels grid: pclass age sibsp 2nd 28 0 > plotmo(a, type="earth", ylim=c(0, 1), caption="type=\"earth\" plotmo glm with mixed fac and non-fac degree2 terms") grid: pclass age sibsp 1st 28 0 > plotmo(a, type="link", ylim=c(0, 1), clip=FALSE, caption="type=\"link\" plotmo glm with mixed fac and non-fac degree2 terms") grid: pclass age sibsp 1st 28 0 > plotmo(a, type="class", ylim=c(0, 1), caption="type=\"class\" plotmo glm with mixed fac and non-fac degree2 terms") grid: pclass age sibsp 1st 28 0 > plotmo(a, ylim=c(0, 1), caption="default type (\"response\")\nplotmo glm with mixed fac and non-fac degree2 terms") grid: pclass age sibsp 1st 28 0 > # now with different type2s > mtext("different type2s", outer=TRUE, font=2, line=1.5, cex=1) > plotmo(a, do.par=FALSE, type2="persp", theta=-20, degree1=FALSE, grid.levels=list(pclass="2nd")) > plotmo(a, do.par=FALSE, type2="contour", degree1=FALSE, grid.levels=list(pclass="2nd")) > plotmo(a, do.par=FALSE, type2="image", degree1=FALSE, grid.levels=list(pclass="2nd"), + col.response=as.numeric(etitanic$survived)+2, pch.response=20) > plotmo(a, do.par=FALSE, type="earth", type2="image", degree1=FALSE, grid.levels=list(pclass="2")) > > # test vector main > > a20 <- earth(O3 ~ humidity + temp + doy, data=ozone1, degree=2, glm=list(family=Gamma)) > > set.seed(1) # needed for nrug > plotmo(a20, nrug=-1) grid: humidity temp doy 64 62 205.5 > > set.seed(1) # needed for nrug and npoints > plotmo(a20, nrug=200, caption="Test plotmo with a vector main (and npoints=200)", + main=c("Humidity", "Temperature", "Day of year", "Humidity: Temperature", "Temperature: Day of Year"), + col.response="gray", pch.response=".", cex.response=3, npoints=200) grid: humidity temp doy 64 62 205.5 > > cat("Expect warning below (missing double titles)\n") Expect warning below (missing double titles) > plotmo(a20, nrug=-1, caption="Test plotmo with a vector main (and plain smooth)", + main=c("Humidity", "Temperature", "Day of year", "Humidity: Temperature"), + col.smooth="indianred") grid: humidity temp doy 64 62 205.5 Warning: not enough elements in "main" (there are more plots than strings in "main") > > cat("Expect warning below (missing single titles)\n") Expect warning below (missing single titles) > plotmo(a20, nrug=-1, caption="Test plotmo with a vector main (and smooth args)", + main=c("Humidity", "Temperature"), + col.smooth="indianred", lwd.smooth=2, lty.smooth=2, + col.response="gray", npoints=500) grid: humidity temp doy 64 62 205.5 Warning: not enough elements in "main" (there are more plots than strings in "main") > > aflip <- earth(O3~vh + wind + humidity + temp, data=ozone1, degree=2) > > # test all1 and all2, with and without degree1 and degree2 > plotmo(aflip, all2=T, caption="all2=T") grid: vh wind humidity temp 5760 5 64 62 > plotmo(aflip, all2=T, degree2=c(4, 2), caption="all2=T, degree2=c(4, 2)") grid: vh wind humidity temp 5760 5 64 62 > plotmo(aflip, all1=T, caption="all1=T") grid: vh wind humidity temp 5760 5 64 62 > plotmo(aflip, all1=T, degree1=c(3,1), degree2=NA, caption="all1=T, degree1=c(3,1), degree2=NA") grid: vh wind humidity temp 5760 5 64 62 > > try(plotmo(aflip, no.such.arg=9)) # expect Error: plotmo: illegal argument "no.such.arg" Error : illegal argument "no.such.arg" > try(plotmo(aflip, ycolumn=1)) # Expect Error: ycolumn is no longer legal, use nresponse instead Error : "ycolumn" is no longer legal, use "nresponse" instead > try(plotmo(aflip, title="abc")) # Expect Error: "title" is illegal, use "caption" instead Error : "title" is illegal, use "caption" instead > try(plotmo(aflip, ticktype="d", ntick=3, tic=3, tick=9)) # expect Error : duplicated arguments "ticktype" "tic" "tick" Error : duplicated arguments "ticktype" "tic" "tick" > try(plotmo(aflip, ticktype="d", ntick=3, tic=3)) # expect Error : duplicated arguments "ticktype" "tic" Error : duplicated arguments "ticktype" "tic" > try(plotmo(aflip, ticktype="s", nt=3)) # expect Error : nticks is illegal with ticktype="simple" grid: vh wind humidity temp 5760 5 64 62 Error : nticks is illegal with ticktype="simple" > try(plotmo(aflip, tic="s", nt=3)) # expect Error : nticks is illegal with ticktype="simple" grid: vh wind humidity temp 5760 5 64 62 Error : nticks is illegal with ticktype="simple" > try(plotmo(aflip, tic="s", nt=3)) # expect Error : nticks is illegal with ticktype="simple" grid: vh wind humidity temp 5760 5 64 62 Error : nticks is illegal with ticktype="simple" > try(plotmo(aflip, adj=8, adj=9)) # Error : duplicated arguments "adj" "adj" Error : duplicated arguments "adj" "adj" > try(plotmo(aflip, adj1=8, adj2=9)) # Error : plotmo: illegal argument "adj1" Error : illegal argument "adj1" > try(plotmo(aflip, yc=8, x2=9)) # expect Error : "ycolumn" is no longer legal, use "nresponse" instead Error : "ycolumn" is no longer legal, use "nresponse" instead ("yc" taken to mean "ycolumn") > try(plotmo(aflip, ticktype="d", ntick=3, ti=3)) # Error : "title" is illegal, use "caption" instead ("ti" taken to mean "title") Error : "title" is illegal, use "caption" instead ("ti" taken to mean "title") > try(plotmo(aflip, ticktype="d", ntick=3, title=3)) # Error : "title" is illegal, use "caption" instead Error : "title" is illegal, use "caption" instead > try(plotmo(aflip, ticktype="d", ntick=3, tit=3, titl=7)) # Error : "title" is illegal, use "caption" instead ("tit" taken to mean "title") Error : "title" is illegal, use "caption" instead ("tit" taken to mean "title") > try(plotmo(aflip, zlab="abc")) # expect Error : "zlab" is illegal, use "ylab" instead Error : "zlab" is illegal, use "ylab" instead > try(plotmo(aflip, z="abc")) # expect Error : "zlab" is illegal, use "ylab" instead ("z" taken to mean "zlab") Error : "zlab" is illegal, use "ylab" instead ("z" taken to mean "zlab") > try(plotmo(aflip, degree1=c(4,1))) # expect Error : out of range value in degree2 (allowed index range is 1:3) Error : out of range value in "degree1" (allowed index range is 1:3) > try(plotmo(aflip, none.such=TRUE)) # expect Error : illegal argument "all1" Error : illegal argument "none.such" > try(plotmo(aflip, ntick=3, type2="im")) # expect Error: the ntick argument is illegal for type2="image" Error : the ntick argument is illegal for type2="image" > try(plotmo(aflip, breaks=3, type2="persp")) # expect Error: the breaks argument is illegal for type2="persp" Error : the breaks argument is illegal for type2="persp" > try(plotmo(aflip, breaks=99, type2="cont")) # expect Error: the breaks argument is illegal for type2="contour" Error : the breaks argument is illegal for type2="contour" > > # test character degree1 and degree2 (added in plotmo version 1.3-0) > > a80 <- earth(O3~., data=ozone1, degree=2) > plotmo(a80, degree1="i", degree2="t", + caption='degree1="i", degree2="t"') grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > plotmo(a80, degree1="^temp$", degree2="^dpg$", + caption='degree1="^temp$", degree2="^dpg$"') grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > # Expect Warning: "nonesuch1" in degree1 does not match any variables, ditto for degree2 > plotmo(a80, degree1=c("temp", "nonesuch1"), degree2=c("nonesuch2", "vis"), + caption='degree1=c("temp", "nonesuch1"), degree2=c("nonesuch2", "vis")') Warning: "nonesuch1" in degree1 does not match any variables Warning: "nonesuch2" in degree2 does not match any variables grid: vh wind humidity temp ibh dpg ibt vis doy 5760 5 64 62 2112.5 24 167.5 120 205.5 > # Expect above warnings and also Warning: nothing to plot > plotmo(a80, degree1="nonesuch1", degree2="nonesuch2") Warning: "nonesuch1" in degree1 does not match any variables Warning: "nonesuch2" in degree2 does not match any variables Warning: plotmo: nothing to plot > > # Test error handling when accessing the original data > > lm.bad <- lm.fit(as.matrix(ozone1[,-1]), as.matrix(ozone1[,1])) > try(plotmo(lm.bad)) # expect Error: this object is not supported by plotmo Error : this object is not supported by plotmo (object's class is "list") > try(plotmo(99)) # expect Error: '99' is not a model object Error : '99' is not an S3 model object > > x <- matrix(c(1,3,2,4,5,6,7,8,9,10, + 2,3,4,5,6,7,8,9,8,9), ncol=2) > > colnames(x) <- c("c1", "c2") > x1 <- x[,1] > x2 <- x[,2] > y <- 3:12 > df <- data.frame(y=y, x1=x1, x2=x2) > foo1 <- function() + { + a.foo1 <- lm(y~x1+x2) + x1 <- NULL + try(plotmo(a.foo1)) # Expect Error: get.plotmo.x.default cannot get the x matrix + } > foo1() Error in model.frame.default(formula = y ~ x1 + x2, na.action = function (object, : invalid type (NULL) for variable 'x1' Error : get.plotmo.x.default cannot get the x matrix (tried object$x, object$call$formula, and object$call$x) > foo2 <- function() + { + a.foo2 <- lm(y~x1+x2, data=df) + df <- NULL + try(plotmo(a.foo2)) # the original data "df" is no longer available (use x=TRUE in the call to lm?) + } > foo2() Error : the data "df" passed to lm is no longer available (use x=TRUE in the call to lm?) (tried object$data, object$x and call$df) > foo3 <- function() + { + a.foo3 <- lm(y~x) # lm() builds a.foo3 model for which predict doesn't work + try(plotmo(a.foo3)) # Error : variable 'x' was fitted with type "nmatrix.2" but type "numeric" was supplied + } > foo3() Warning: 'newdata' had 8 rows but variables found have 10 rows Error : predict.lm(xgrid, type="response") returned the wrong length (got 10 expected 8) > foo4 <- function() + { + a.foo4 <- lm(y~x[,1]+x[,2]) # lm() builds a.foo4 model for which predict doesn't work + try(plotmo(a.foo4)) # Error : predict.lm(xgrid, type="response") returned a response of the wrong length. + } > foo4() Warning: 'newdata' had 8 rows but variables found have 10 rows Error : predict.lm(xgrid, type="response") returned the wrong length (got 10 expected 8) > foo5 <- function() + { + a.foo5 <- lm(y~x1+x2) + x1 <- c(1,2,3) + try(plotmo(a.foo5)) # Expect Error: get.plotmo.x.default cannot get the x matrix + } > foo5() Error in model.frame.default(formula = y ~ x1 + x2, na.action = function (object, : variable lengths differ (found for 'x1') Error : get.plotmo.x.default cannot get the x matrix (tried object$x, object$call$formula, and object$call$x) > foo6 <- function() + { + a.foo6 <- lm(y~x1+x2) + y[1] <- NA + try(plotmo(a.foo6, col.response=3)) # Error: get.plotmo.x.default cannot get the x matrix + } > foo6() Error in na.fail.default(structure(list(y = c(NA, 4L, 5L, 6L, 7L, 8L, : missing values in object Error : get.plotmo.x.default cannot get the x matrix (tried object$x, object$call$formula, and object$call$x) > foo7 <- function() + { + a.foo7 <- lm(y~x1+x2) + y[1] <- Inf + plotmo(a.foo7, col.response=3) # Warning: non finite values returned by get.plotmo.y, see print above + } > foo7() Warning: non-finite values returned by get.plotmo.y grid: x1 x2 5.5 6.5 > # TODO removed because this now works (why?) > # foo8 <- function() > # { > # i <- 1 > # a.foo8 <- lm(y~x[,i]+x[,2]) > # try(plotmo(a.foo8, trace=2)) # Error: predict.lm(xgrid, type="response") returned a response of the wrong length. > # } > # foo8() > foo9 <- function() + { + my.list <- list(j=2) + a.foo9 <- lm(y~x[,1]+x[,my.list$j]) + try(plotmo(a.foo9, trace=2)) # Error: plotmo: names with "$" are not yet supported. + } > foo9() --get.plotmo.x for lm object Error : plotmo: names with "$" are not yet supported. The offending formula is y ~ x[, 1] + x[, my.list$j] > > # TODO removed because this now works (why?) > # # test "entire x matrix is stored as the first element of evaluated.mf\n") > # x <- matrix(c(1,3,2,4,5, > # 2,3,4,5,6), ncol=2) # actual values not important > # y <- 3:7 > # lm.model <- lm(y~x) > # try(plotmo(lm.model, trace=2, caption="lm.model <- lm(y~x)")) # Expect predict.lm(xgrid, type="response") returned a response of the wrong length. > > set.seed(1235) > tit <- etitanic > tit <- tit[c(30:80,330:380,630:680), ] > a <- earth(survived~., data=tit, glm=list(family=binomial), degree=2) > plotmo(a, grid.levels=list(sex="ma"), caption="smooth: survived, sex=\"m\"", + col.smooth="indianred", lwd.smooth=2, + col.response=as.numeric(tit$survived)+2, pch.response=".", type2="im", + cex.response=3, jitter.response=.3) grid: pclass sex age sibsp parch 1st male 29 0 0 > set.seed(1238) > a <- earth(pclass~., data=tit, degree=2) > plotmo(a, type="class", grid.levels=list(sex="ma"), caption="smooth: pclass, sex=\"m\"", + col.smooth="indianred", lwd.smooth=2, + col.response=as.numeric(tit$pclass)+1, type2="im", + pch.response=".", cex.response=3, jitter.response=.3) grid: survived sex age sibsp parch 0 male 29 0 0 > > if(!interactive()) { + dev.off() # finish postscript plot + q(runLast=FALSE) # needed else R prints the time on exit (R2.5 and higher) which messes up the diffs + }