#Load independent evaluation data. DataSpecies_township_line_section_with_predictors<-read.table( "C:/Users/Steve/Desktop/biomod2/biomod2_files_to_be_loaded/township_line_section_with_predictors.csv", sep=",", header=TRUE, colClasses = "numeric") DataSpecies_township_bt_post_with_predictors<-read.table( "C:/Users/Steve/Desktop/biomod2/biomod2_files_to_be_loaded/township_bt_post_with_predictors.csv", sep=",", header=TRUE, colClasses = "numeric") #State the number of regression trees in each simplified model. #The number of trees should be taken from the previous step, i.e. #when developing the simplified models. n.trees.abi.bal = 1150 n.trees.ace.rub = 1100 n.trees.ace.sac = 1250 n.trees.aln.inc = 1500 n.trees.bet.all = 1400 n.trees.car.spp = 1150 n.trees.cas.den = 1900 n.trees.fag.gra = 1200 n.trees.fra.ame = 1150 n.trees.fra.nig = 1950 n.trees.jug.cin = 1550 n.trees.jug.nig = 1600 n.trees.lir.tul = 1750 n.trees.mag.acu = 1050 n.trees.ost.vir = 1700 n.trees.pin.str = 1350 n.trees.pla.occ = 1300 n.trees.pru.ser = 1650 n.trees.que.alb = 1600 n.trees.que.vel = 1050 n.trees.til.ame = 1250 n.trees.tsu.can = 1550 n.trees.ulm.ame = 1650 #Create raster stacks for projecting models in geographic space #later. "myExpl_with_native_variables" = with NAVs, #"myExpl_without_native_variables" = without NAVs. myExpl_with_native_variables <- stack( "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/aetoverpet07", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/cti", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/drainclass", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/percentclay", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/percentsand", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/ph", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/precipgs", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/slopedegrees", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/solradgs", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/temp01avg", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/tempavggs", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/historicvill", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/lwvill", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/trails") myExpl_without_native_variables <- stack( "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/aetoverpet07", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/cti", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/drainclass", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/percentclay", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/percentsand", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/ph", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/precipgs", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/slopedegrees", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/solradgs", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/temp01avg", "C:/Users/Steve/Desktop/biomod2/biomod2_predictors/tempavggs") #Project the models into geographic space, to create prediction #surfaces. MyGbmModelOutPrediction.abi.bal <- predict( myExpl_with_native_variables, myGbmModelOut.abi.bal.simplified, n.trees = n.trees.abi.bal, type="response") MyGbmModelOutPrediction.ace.rub <- predict( myExpl_with_native_variables, myGbmModelOut.ace.rub.simplified, n.trees = n.trees.ace.rub, type="response") MyGbmModelOutPrediction.ace.sac <- predict( myExpl_with_native_variables, myGbmModelOut.ace.sac.simplified, n.trees = n.trees.ace.sac, type="response") MyGbmModelOutPrediction.aln.inc <- predict( myExpl_with_native_variables, myGbmModelOut.aln.inc.simplified, n.trees = n.trees.aln.inc, type="response") MyGbmModelOutPrediction.bet.all <- predict( myExpl_with_native_variables, myGbmModelOut.bet.all.simplified, n.trees = n.trees.bet.all, type="response") MyGbmModelOutPrediction.car.spp <- predict( myExpl_with_native_variables, myGbmModelOut.car.spp.simplified, n.trees = n.trees.car.spp, type="response") MyGbmModelOutPrediction.cas.den <- predict( myExpl_with_native_variables, myGbmModelOut.cas.den.simplified, n.trees = n.trees.cas.den, type="response") MyGbmModelOutPrediction.fag.gra <- predict( myExpl_with_native_variables, myGbmModelOut.fag.gra.simplified, n.trees = n.trees.fag.gra, type="response") MyGbmModelOutPrediction.fra.ame <- predict( myExpl_with_native_variables, myGbmModelOut.fra.ame.simplified, n.trees = n.trees.fra.ame, type="response") MyGbmModelOutPrediction.fra.nig <- predict( myExpl_with_native_variables, myGbmModelOut.fra.nig.simplified, n.trees = n.trees.fra.nig, type="response") MyGbmModelOutPrediction.jug.cin <- predict( myExpl_with_native_variables, myGbmModelOut.jug.cin.simplified, n.trees = n.trees.jug.cin, type="response") MyGbmModelOutPrediction.jug.nig <- predict( myExpl_with_native_variables, myGbmModelOut.jug.nig.simplified, n.trees = n.trees.jug.nig, type="response") MyGbmModelOutPrediction.lir.tul <- predict( myExpl_with_native_variables, myGbmModelOut.lir.tul.simplified, n.trees = n.trees.lir.tul, type="response") MyGbmModelOutPrediction.mag.acu <- predict( myExpl_with_native_variables, myGbmModelOut.mag.acu.simplified, n.trees = n.trees.mag.acu, type="response") MyGbmModelOutPrediction.ost.vir <- predict( myExpl_with_native_variables, myGbmModelOut.ost.vir.simplified, n.trees = n.trees.ost.vir, type="response") MyGbmModelOutPrediction.pin.str <- predict( myExpl_with_native_variables, myGbmModelOut.pin.str.simplified, n.trees = n.trees.pin.str, type="response") MyGbmModelOutPrediction.pla.occ <- predict( myExpl_with_native_variables, myGbmModelOut.pla.occ.simplified, n.trees = n.trees.pla.occ, type="response") MyGbmModelOutPrediction.pru.ser <- predict( myExpl_with_native_variables, myGbmModelOut.pru.ser.simplified, n.trees = n.trees.pru.ser, type="response") MyGbmModelOutPrediction.que.alb <- predict( myExpl_with_native_variables, myGbmModelOut.que.alb.simplified, n.trees = n.trees.que.alb, type="response") MyGbmModelOutPrediction.que.vel <- predict( myExpl_with_native_variables, myGbmModelOut.que.vel.simplified, n.trees = n.trees.que.vel, type="response") MyGbmModelOutPrediction.til.ame <- predict( myExpl_with_native_variables, myGbmModelOut.til.ame.simplified, n.trees = n.trees.til.ame, type="response") MyGbmModelOutPrediction.tsu.can <- predict( myExpl_with_native_variables, myGbmModelOut.tsu.can.simplified, n.trees = n.trees.tsu.can, type="response") MyGbmModelOutPrediction.ulm.ame <- predict( myExpl_with_native_variables, myGbmModelOut.ulm.ame.simplified, n.trees = n.trees.ulm.ame, type="response") #Save rasters of projections. writeRaster(MyGbmModelOutPrediction.abi.bal, filename = "abi_bal", format = "GTiff") writeRaster(MyGbmModelOutPrediction.ace.rub, filename = "ace_rub", format = "GTiff") writeRaster(MyGbmModelOutPrediction.ace.sac, filename = "ace_sac", format = "GTiff") writeRaster(MyGbmModelOutPrediction.aln.inc, filename = "aln_inc", format = "GTiff") writeRaster(MyGbmModelOutPrediction.bet.all, filename = "bet_all", format = "GTiff") writeRaster(MyGbmModelOutPrediction.car.spp, filename = "car_spp", format = "GTiff") writeRaster(MyGbmModelOutPrediction.cas.den, filename = "cas_den", format = "GTiff") writeRaster(MyGbmModelOutPrediction.fag.gra, filename = "fag_gra", format = "GTiff") writeRaster(MyGbmModelOutPrediction.fra.ame, filename = "fra_ame", format = "GTiff") writeRaster(MyGbmModelOutPrediction.fra.nig, filename = "fra_nig", format = "GTiff") writeRaster(MyGbmModelOutPrediction.jug.cin, filename = "jug_cin", format = "GTiff") writeRaster(MyGbmModelOutPrediction.jug.nig, filename = "jug_nig", format = "GTiff") writeRaster(MyGbmModelOutPrediction.lir.tul, filename = "lir_tul", format = "GTiff") writeRaster(MyGbmModelOutPrediction.mag.acu, filename = "mag_acu", format = "GTiff") writeRaster(MyGbmModelOutPrediction.ost.vir, filename = "ost_vir", format = "GTiff") writeRaster(MyGbmModelOutPrediction.pin.str, filename = "pin_str", format = "GTiff") writeRaster(MyGbmModelOutPrediction.pla.occ, filename = "pla_occ", format = "GTiff") writeRaster(MyGbmModelOutPrediction.pru.ser, filename = "pru_ser", format = "GTiff") writeRaster(MyGbmModelOutPrediction.que.alb, filename = "que_alb", format = "GTiff") writeRaster(MyGbmModelOutPrediction.que.vel, filename = "que_vel", format = "GTiff") writeRaster(MyGbmModelOutPrediction.til.ame, filename = "til_ame", format = "GTiff") writeRaster(MyGbmModelOutPrediction.tsu.can, filename = "tsu_can", format = "GTiff") writeRaster(MyGbmModelOutPrediction.ulm.ame, filename = "ulm_ame", format = "GTiff") #Calculate and save variable importance for each model. capture.output(summary(myGbmModelOut.abi.bal.simplified), file = "myGbmModelOut.abi.bal.simplified.txt") capture.output(summary(myGbmModelOut.ace.rub.simplified), file = "myGbmModelOut.ace.rub.simplified.txt") capture.output(summary(myGbmModelOut.ace.sac.simplified), file = "myGbmModelOut.ace.sac.simplified.txt") capture.output(summary(myGbmModelOut.aln.inc.simplified), file = "myGbmModelOut.aln.inc.simplified.txt") capture.output(summary(myGbmModelOut.bet.all.simplified), file = "myGbmModelOut.bet.all.simplified.txt") capture.output(summary(myGbmModelOut.car.spp.simplified), file = "myGbmModelOut.car.spp.simplified.txt") capture.output(summary(myGbmModelOut.cas.den.simplified), file = "myGbmModelOut.cas.den.simplified.txt") capture.output(summary(myGbmModelOut.fag.gra.simplified), file = "myGbmModelOut.fag.gra.simplified.txt") capture.output(summary(myGbmModelOut.fra.ame.simplified), file = "myGbmModelOut.fra.ame.simplified.txt") capture.output(summary(myGbmModelOut.fra.nig.simplified), file = "myGbmModelOut.fra.nig.simplified.txt") capture.output(summary(myGbmModelOut.jug.cin.simplified), file = "myGbmModelOut.jug.cin.simplified.txt") capture.output(summary(myGbmModelOut.jug.nig.simplified), file = "myGbmModelOut.jug.nig.simplified.txt") capture.output(summary(myGbmModelOut.lir.tul.simplified), file = "myGbmModelOut.lir.tul.simplified.txt") capture.output(summary(myGbmModelOut.mag.acu.simplified), file = "myGbmModelOut.mag.acu.simplified.txt") capture.output(summary(myGbmModelOut.ost.vir.simplified), file = "myGbmModelOut.ost.vir.simplified.txt") capture.output(summary(myGbmModelOut.pin.str.simplified), file = "myGbmModelOut.pin.str.simplified.txt") capture.output(summary(myGbmModelOut.pla.occ.simplified), file = "myGbmModelOut.pla.occ.simplified.txt") capture.output(summary(myGbmModelOut.pru.ser.simplified), file = "myGbmModelOut.pru.ser.simplified.txt") capture.output(summary(myGbmModelOut.que.alb.simplified), file = "myGbmModelOut.que.alb.simplified.txt") capture.output(summary(myGbmModelOut.que.vel.simplified), file = "myGbmModelOut.que.vel.simplified.txt") capture.output(summary(myGbmModelOut.til.ame.simplified), file = "myGbmModelOut.til.ame.simplified.txt") capture.output(summary(myGbmModelOut.tsu.can.simplified), file = "myGbmModelOut.tsu.can.simplified.txt") capture.output(summary(myGbmModelOut.ulm.ame.simplified), file = "myGbmModelOut.ulm.ame.simplified.txt") #Plot the univariate response curves for each species model. tiff( filename = "myGbmModelOut.abi.bal.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.abi.bal.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.ace.rub.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.ace.rub.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.ace.sac.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.ace.sac.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.aln.inc.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.aln.inc.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.bet.all.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.bet.all.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.car.spp.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.car.spp.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.cas.den.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.cas.den.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.fag.gra.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.fag.gra.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.fra.ame.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.fra.ame.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.fra.nig.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.fra.nig.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.jug.cin.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.jug.cin.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.jug.nig.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.jug.nig.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.lir.tul.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.lir.tul.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.mag.acu.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.mag.acu.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.ost.vir.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.ost.vir.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.pin.str.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.pin.str.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.pla.occ.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.pla.occ.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.pru.ser.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.pru.ser.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.que.alb.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.que.alb.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.que.vel.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.que.vel.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.til.ame.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.til.ame.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.tsu.can.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.tsu.can.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() tiff( filename = "myGbmModelOut.ulm.ame.simplified.curves.%03d.tiff", width = 6.5, height = 8, units = "in", pointsize = 12, res = 600) gbm.plot(myGbmModelOut.ulm.ame.simplified, smooth = TRUE, plot.layout = c(3, 3), rug = FALSE) dev.off() #Evaluate the models upon the training data. abi.bal.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, abi.bal == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, abi.bal == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.abi.bal.simplified, n.trees = n.trees.abi.bal) ace.rub.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, ace.rub == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, ace.rub == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ace.rub.simplified, n.trees = n.trees.ace.rub) ace.sac.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, ace.sac == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, ace.sac == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ace.sac.simplified, n.trees = n.trees.ace.sac) aln.inc.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, aln.inc == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, aln.inc == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.aln.inc.simplified, n.trees = n.trees.aln.inc) bet.all.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, bet.all == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, bet.all == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.bet.all.simplified, n.trees = n.trees.bet.all) car.spp.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, car.spp == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, car.spp == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.car.spp.simplified, n.trees = n.trees.car.spp) cas.den.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, cas.den == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, cas.den == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.cas.den.simplified, n.trees = n.trees.cas.den) fag.gra.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, fag.gra == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, fag.gra == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fag.gra.simplified, n.trees = n.trees.fag.gra) fra.ame.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, fra.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, fra.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fra.ame.simplified, n.trees = n.trees.fra.ame) fra.nig.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, fra.nig == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, fra.nig == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fra.nig.simplified, n.trees = n.trees.fra.nig) jug.cin.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, jug.cin == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, jug.cin == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.jug.cin.simplified, n.trees = n.trees.jug.cin) jug.nig.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, jug.nig == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, jug.nig == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.jug.nig.simplified, n.trees = n.trees.jug.nig) lir.tul.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, lir.tul == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, lir.tul == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.lir.tul.simplified, n.trees = n.trees.lir.tul) mag.acu.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, mag.acu == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, mag.acu == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.mag.acu.simplified, n.trees = n.trees.mag.acu) ost.vir.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, ost.vir == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, ost.vir == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ost.vir.simplified, n.trees = n.trees.ost.vir) pin.str.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, pin.str == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, pin.str == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.pin.str.simplified, n.trees = n.trees.pin.str) pla.occ.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, pla.occ == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, pla.occ == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.pla.occ.simplified, n.trees = n.trees.pla.occ) pru.ser.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, pru.ser == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, pru.ser == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.pru.ser.simplified, n.trees = n.trees.pru.ser) que.alb.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, que.alb == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, que.alb == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.que.alb.simplified, n.trees = n.trees.que.alb) que.vel.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, que.vel == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, que.vel == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.que.vel.simplified, n.trees = n.trees.que.vel) til.ame.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, til.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, til.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.til.ame.simplified, n.trees = n.trees.til.ame) tsu.can.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, tsu.can == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, tsu.can == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.tsu.can.simplified, n.trees = n.trees.tsu.can) ulm.ame.eval.upon.lot.line.section <- evaluate( p = subset(DataSpecies_lot_line_section_with_predictors, ulm.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_lot_line_section_with_predictors, ulm.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ulm.ame.simplified, n.trees = n.trees.ulm.ame) #Save the model evaluations upon the training data. capture.output(abi.bal.eval.upon.lot.line.section, file = "myGbmModelOut.abi.bal.eval.upon.training.data.txt") capture.output(ace.rub.eval.upon.lot.line.section, file = "myGbmModelOut.ace.rub.eval.upon.training.data.txt") capture.output(ace.sac.eval.upon.lot.line.section, file = "myGbmModelOut.ace.sac.eval.upon.training.data.txt") capture.output(aln.inc.eval.upon.lot.line.section, file = "myGbmModelOut.aln.inc.eval.upon.training.data.txt") capture.output(bet.all.eval.upon.lot.line.section, file = "myGbmModelOut.bet.all.eval.upon.training.data.txt") capture.output(car.spp.eval.upon.lot.line.section, file = "myGbmModelOut.car.spp.eval.upon.training.data.txt") capture.output(cas.den.eval.upon.lot.line.section, file = "myGbmModelOut.cas.den.eval.upon.training.data.txt") capture.output(fag.gra.eval.upon.lot.line.section, file = "myGbmModelOut.fag.gra.eval.upon.training.data.txt") capture.output(fra.ame.eval.upon.lot.line.section, file = "myGbmModelOut.fra.ame.eval.upon.training.data.txt") capture.output(fra.nig.eval.upon.lot.line.section, file = "myGbmModelOut.fra.nig.eval.upon.training.data.txt") capture.output(jug.cin.eval.upon.lot.line.section, file = "myGbmModelOut.jug.cin.eval.upon.training.data.txt") capture.output(jug.nig.eval.upon.lot.line.section, file = "myGbmModelOut.jug.nig.eval.upon.training.data.txt") capture.output(lir.tul.eval.upon.lot.line.section, file = "myGbmModelOut.lir.tul.eval.upon.training.data.txt") capture.output(mag.acu.eval.upon.lot.line.section, file = "myGbmModelOut.mag.acu.eval.upon.training.data.txt") capture.output(ost.vir.eval.upon.lot.line.section, file = "myGbmModelOut.ost.vir.eval.upon.training.data.txt") capture.output(pin.str.eval.upon.lot.line.section, file = "myGbmModelOut.pin.str.eval.upon.training.data.txt") capture.output(pla.occ.eval.upon.lot.line.section, file = "myGbmModelOut.pla.occ.eval.upon.training.data.txt") capture.output(pru.ser.eval.upon.lot.line.section, file = "myGbmModelOut.pru.ser.eval.upon.training.data.txt") capture.output(que.alb.eval.upon.lot.line.section, file = "myGbmModelOut.que.alb.eval.upon.training.data.txt") capture.output(que.vel.eval.upon.lot.line.section, file = "myGbmModelOut.que.vel.eval.upon.training.data.txt") capture.output(til.ame.eval.upon.lot.line.section, file = "myGbmModelOut.til.ame.eval.upon.training.data.txt") capture.output(tsu.can.eval.upon.lot.line.section, file = "myGbmModelOut.tsu.can.eval.upon.training.data.txt") capture.output(ulm.ame.eval.upon.lot.line.section, file = "myGbmModelOut.ulm.ame.eval.upon.training.data.txt") #Evaluate the models upon the township line section data. #abi.bal.eval.upon.township.line.section <- evaluate( #p = subset(DataSpecies_township_line_section_with_predictors, abi.bal == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), #a = subset(DataSpecies_township_line_section_with_predictors, abi.bal == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), #myGbmModelOut.abi.bal.simplified, #n.trees = n.trees.abi.bal) ace.rub.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, ace.rub == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, ace.rub == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ace.rub.simplified, n.trees = n.trees.ace.rub) ace.sac.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, ace.sac == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, ace.sac == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ace.sac.simplified, n.trees = n.trees.ace.sac) aln.inc.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, aln.inc == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, aln.inc == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.aln.inc.simplified, n.trees = n.trees.aln.inc) bet.all.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, bet.all == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, bet.all == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.bet.all.simplified, n.trees = n.trees.bet.all) car.spp.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, car.spp == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, car.spp == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.car.spp.simplified, n.trees = n.trees.car.spp) cas.den.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, cas.den == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, cas.den == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.cas.den.simplified, n.trees = n.trees.cas.den) fag.gra.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, fag.gra == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, fag.gra == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fag.gra.simplified, n.trees = n.trees.fag.gra) fra.ame.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, fra.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, fra.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fra.ame.simplified, n.trees = n.trees.fra.ame) fra.nig.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, fra.nig == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, fra.nig == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fra.nig.simplified, n.trees = n.trees.fra.nig) jug.cin.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, jug.cin == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, jug.cin == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.jug.cin.simplified, n.trees = n.trees.jug.cin) jug.nig.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, jug.nig == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, jug.nig == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.jug.nig.simplified, n.trees = n.trees.jug.nig) #lir.tul.eval.upon.township.line.section <- evaluate( #p = subset(DataSpecies_township_line_section_with_predictors, lir.tul == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), #a = subset(DataSpecies_township_line_section_with_predictors, lir.tul == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), #myGbmModelOut.lir.tul.simplified, #n.trees = n.trees.lir.tul) mag.acu.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, mag.acu == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, mag.acu == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.mag.acu.simplified, n.trees = n.trees.mag.acu) ost.vir.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, ost.vir == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, ost.vir == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ost.vir.simplified, n.trees = n.trees.ost.vir) pin.str.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, pin.str == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, pin.str == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.pin.str.simplified, n.trees = n.trees.pin.str) pla.occ.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, pla.occ == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, pla.occ == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.pla.occ.simplified, n.trees = n.trees.pla.occ) pru.ser.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, pru.ser == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, pru.ser == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.pru.ser.simplified, n.trees = n.trees.pru.ser) que.alb.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, que.alb == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, que.alb == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.que.alb.simplified, n.trees = n.trees.que.alb) que.vel.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, que.vel == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, que.vel == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.que.vel.simplified, n.trees = n.trees.que.vel) til.ame.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, til.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, til.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.til.ame.simplified, n.trees = n.trees.til.ame) tsu.can.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, tsu.can == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, tsu.can == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.tsu.can.simplified, n.trees = n.trees.tsu.can) ulm.ame.eval.upon.township.line.section <- evaluate( p = subset(DataSpecies_township_line_section_with_predictors, ulm.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_line_section_with_predictors, ulm.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ulm.ame.simplified, n.trees = n.trees.ulm.ame) #Save the model evaluations upon the township line section data. #capture.output(abi.bal.eval.upon.township.line.section, file = "myGbmModelOut.abi.bal.eval.upon.township.line.section.txt") capture.output(ace.rub.eval.upon.township.line.section, file = "myGbmModelOut.ace.rub.eval.upon.township.line.section.txt") capture.output(ace.sac.eval.upon.township.line.section, file = "myGbmModelOut.ace.sac.eval.upon.township.line.section.txt") capture.output(aln.inc.eval.upon.township.line.section, file = "myGbmModelOut.aln.inc.eval.upon.township.line.section.txt") capture.output(bet.all.eval.upon.township.line.section, file = "myGbmModelOut.bet.all.eval.upon.township.line.section.txt") capture.output(car.spp.eval.upon.township.line.section, file = "myGbmModelOut.car.spp.eval.upon.township.line.section.txt") capture.output(cas.den.eval.upon.township.line.section, file = "myGbmModelOut.cas.den.eval.upon.township.line.section.txt") capture.output(fag.gra.eval.upon.township.line.section, file = "myGbmModelOut.fag.gra.eval.upon.township.line.section.txt") capture.output(fra.ame.eval.upon.township.line.section, file = "myGbmModelOut.fra.ame.eval.upon.township.line.section.txt") capture.output(fra.nig.eval.upon.township.line.section, file = "myGbmModelOut.fra.nig.eval.upon.township.line.section.txt") capture.output(jug.cin.eval.upon.township.line.section, file = "myGbmModelOut.jug.cin.eval.upon.township.line.section.txt") capture.output(jug.nig.eval.upon.township.line.section, file = "myGbmModelOut.jug.nig.eval.upon.township.line.section.txt") #capture.output(lir.tul.eval.upon.township.line.section, file = "myGbmModelOut.lir.tul.eval.upon.township.line.section.txt") capture.output(mag.acu.eval.upon.township.line.section, file = "myGbmModelOut.mag.acu.eval.upon.township.line.section.txt") capture.output(ost.vir.eval.upon.township.line.section, file = "myGbmModelOut.ost.vir.eval.upon.township.line.section.txt") capture.output(pin.str.eval.upon.township.line.section, file = "myGbmModelOut.pin.str.eval.upon.township.line.section.txt") capture.output(pla.occ.eval.upon.township.line.section, file = "myGbmModelOut.pla.occ.eval.upon.township.line.section.txt") capture.output(pru.ser.eval.upon.township.line.section, file = "myGbmModelOut.pru.ser.eval.upon.township.line.section.txt") capture.output(que.alb.eval.upon.township.line.section, file = "myGbmModelOut.que.alb.eval.upon.township.line.section.txt") capture.output(que.vel.eval.upon.township.line.section, file = "myGbmModelOut.que.vel.eval.upon.township.line.section.txt") capture.output(til.ame.eval.upon.township.line.section, file = "myGbmModelOut.til.ame.eval.upon.township.line.section.txt") capture.output(tsu.can.eval.upon.township.line.section, file = "myGbmModelOut.tsu.can.eval.upon.township.line.section.txt") capture.output(ulm.ame.eval.upon.township.line.section, file = "myGbmModelOut.ulm.ame.eval.upon.township.line.section.txt") #Evaluate the models upon the township bearing-tree data. #abi.bal.eval.upon.township.bt.post <- evaluate( #p = subset(DataSpecies_township_bt_post_with_predictors, abi.bal == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), #a = subset(DataSpecies_township_bt_post_with_predictors, abi.bal == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), #myGbmModelOut.abi.bal.simplified, #n.trees = n.trees.abi.bal) ace.rub.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, ace.rub == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, ace.rub == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ace.rub.simplified, n.trees = n.trees.ace.rub) ace.sac.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, ace.sac == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, ace.sac == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ace.sac.simplified, n.trees = n.trees.ace.sac) #aln.inc.eval.upon.township.bt.post <- evaluate( #p = subset(DataSpecies_township_bt_post_with_predictors, aln.inc == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), #a = subset(DataSpecies_township_bt_post_with_predictors, aln.inc == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), #myGbmModelOut.aln.inc.simplified, #n.trees = n.trees.aln.inc) bet.all.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, bet.all == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, bet.all == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.bet.all.simplified, n.trees = n.trees.bet.all) car.spp.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, car.spp == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, car.spp == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.car.spp.simplified, n.trees = n.trees.car.spp) cas.den.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, cas.den == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, cas.den == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.cas.den.simplified, n.trees = n.trees.cas.den) fag.gra.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, fag.gra == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, fag.gra == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fag.gra.simplified, n.trees = n.trees.fag.gra) fra.ame.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, fra.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, fra.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fra.ame.simplified, n.trees = n.trees.fra.ame) fra.nig.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, fra.nig == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, fra.nig == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.fra.nig.simplified, n.trees = n.trees.fra.nig) #jug.cin.eval.upon.township.bt.post <- evaluate( #p = subset(DataSpecies_township_bt_post_with_predictors, jug.cin == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), #a = subset(DataSpecies_township_bt_post_with_predictors, jug.cin == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), #myGbmModelOut.jug.cin.simplified, #n.trees = n.trees.jug.cin) #jug.nig.eval.upon.township.bt.post <- evaluate( #p = subset(DataSpecies_township_bt_post_with_predictors, jug.nig == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), #a = subset(DataSpecies_township_bt_post_with_predictors, jug.nig == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), #myGbmModelOut.jug.nig.simplified, #n.trees = n.trees.jug.nig) #lir.tul.eval.upon.township.bt.post <- evaluate( #p = subset(DataSpecies_township_bt_post_with_predictors, lir.tul == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), #a = subset(DataSpecies_township_bt_post_with_predictors, lir.tul == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), #myGbmModelOut.lir.tul.simplified, #n.trees = n.trees.lir.tul) mag.acu.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, mag.acu == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, mag.acu == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.mag.acu.simplified, n.trees = n.trees.mag.acu) ost.vir.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, ost.vir == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, ost.vir == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ost.vir.simplified, n.trees = n.trees.ost.vir) pin.str.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, pin.str == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, pin.str == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.pin.str.simplified, n.trees = n.trees.pin.str) #pla.occ.eval.upon.township.bt.post <- evaluate( #p = subset(DataSpecies_township_bt_post_with_predictors, pla.occ == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), #a = subset(DataSpecies_township_bt_post_with_predictors, pla.occ == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), #myGbmModelOut.pla.occ.simplified, #n.trees = n.trees.pla.occ) pru.ser.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, pru.ser == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, pru.ser == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.pru.ser.simplified, n.trees = n.trees.pru.ser) que.alb.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, que.alb == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, que.alb == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.que.alb.simplified, n.trees = n.trees.que.alb) que.vel.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, que.vel == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, que.vel == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.que.vel.simplified, n.trees = n.trees.que.vel) til.ame.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, til.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, til.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.til.ame.simplified, n.trees = n.trees.til.ame) tsu.can.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, tsu.can == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, tsu.can == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.tsu.can.simplified, n.trees = n.trees.tsu.can) ulm.ame.eval.upon.township.bt.post <- evaluate( p = subset(DataSpecies_township_bt_post_with_predictors, ulm.ame == 1, select = c(x_coord:y_coord, aetoverpet07:trails)), a = subset(DataSpecies_township_bt_post_with_predictors, ulm.ame == 0, select = c(x_coord:y_coord, aetoverpet07:trails)), myGbmModelOut.ulm.ame.simplified, n.trees = n.trees.ulm.ame) #Save the model evaluations upon the township bearing-tree data. #capture.output(abi.bal.eval.upon.township.bt.post, file = "myGbmModelOut.abi.bal.eval.upon.township.bt.post.txt") capture.output(ace.rub.eval.upon.township.bt.post, file = "myGbmModelOut.ace.rub.eval.upon.township.bt.post.txt") capture.output(ace.sac.eval.upon.township.bt.post, file = "myGbmModelOut.ace.sac.eval.upon.township.bt.post.txt") #capture.output(aln.inc.eval.upon.township.bt.post, file = "myGbmModelOut.aln.inc.eval.upon.township.bt.post.txt") capture.output(bet.all.eval.upon.township.bt.post, file = "myGbmModelOut.bet.all.eval.upon.township.bt.post.txt") capture.output(car.spp.eval.upon.township.bt.post, file = "myGbmModelOut.car.spp.eval.upon.township.bt.post.txt") capture.output(cas.den.eval.upon.township.bt.post, file = "myGbmModelOut.cas.den.eval.upon.township.bt.post.txt") capture.output(fag.gra.eval.upon.township.bt.post, file = "myGbmModelOut.fag.gra.eval.upon.township.bt.post.txt") capture.output(fra.ame.eval.upon.township.bt.post, file = "myGbmModelOut.fra.ame.eval.upon.township.bt.post.txt") capture.output(fra.nig.eval.upon.township.bt.post, file = "myGbmModelOut.fra.nig.eval.upon.township.bt.post.txt") #capture.output(jug.cin.eval.upon.township.bt.post, file = "myGbmModelOut.jug.cin.eval.upon.township.bt.post.txt") #capture.output(jug.nig.eval.upon.township.bt.post, file = "myGbmModelOut.jug.nig.eval.upon.township.bt.post.txt") #capture.output(lir.tul.eval.upon.township.bt.post, file = "myGbmModelOut.lir.tul.eval.upon.township.bt.post.txt") capture.output(mag.acu.eval.upon.township.bt.post, file = "myGbmModelOut.mag.acu.eval.upon.township.bt.post.txt") capture.output(ost.vir.eval.upon.township.bt.post, file = "myGbmModelOut.ost.vir.eval.upon.township.bt.post.txt") capture.output(pin.str.eval.upon.township.bt.post, file = "myGbmModelOut.pin.str.eval.upon.township.bt.post.txt") #capture.output(pla.occ.eval.upon.township.bt.post, file = "myGbmModelOut.pla.occ.eval.upon.township.bt.post.txt") capture.output(pru.ser.eval.upon.township.bt.post, file = "myGbmModelOut.pru.ser.eval.upon.township.bt.post.txt") capture.output(que.alb.eval.upon.township.bt.post, file = "myGbmModelOut.que.alb.eval.upon.township.bt.post.txt") capture.output(que.vel.eval.upon.township.bt.post, file = "myGbmModelOut.que.vel.eval.upon.township.bt.post.txt") capture.output(til.ame.eval.upon.township.bt.post, file = "myGbmModelOut.til.ame.eval.upon.township.bt.post.txt") capture.output(tsu.can.eval.upon.township.bt.post, file = "myGbmModelOut.tsu.can.eval.upon.township.bt.post.txt") capture.output(ulm.ame.eval.upon.township.bt.post, file = "myGbmModelOut.ulm.ame.eval.upon.township.bt.post.txt") #Save workspace. save.image(file="sdm.objects.with.Native.variables.biomod2.step.4.RData")