Comparing approaches to forecasting species richness using the Breeding Bird Survey

This project attempts to develop and evaluate a variety of approaches to making relatively short-term forecasts for patterns of species richness in the Breeding Bird Survey of North America data (BBS). BBS is being used as a starting point to develop these forecasts for community ecology more generally.

Forecasting methods currently being used include:

  • Naive (last observed value in the time-series)
  • Long-term average of value
  • ARIMA models
  • Spatial environmental linear models (currently just MODIS NDVI)
  • Temporal environmental linear models (i.e., regressions fit to time-series at focal site; currently just MODIS NDVI)

Additional modeling approaches to be added include:

  • Stacked single-species SDMs
  • Joint SDMs
  • spatio-temporal models?
  • model averaging

In [1]:
library(forecast)
library(Hmisc)
library(dplyr)
library(broom)
library(ggplot2)
library(tidyr)
library(mgcv)
library(lme4)
library(caret)
library(gridExtra)
devtools::load_all()

library(sp)
library(raster)
library(maptools)
library(rgeos)
library(rgdal)
library(maps)
library(viridis)


Loading required package: zoo

Attaching package: ‘zoo’

The following objects are masked from ‘package:base’:

    as.Date, as.Date.numeric

Loading required package: timeDate
This is forecast 7.1 

Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2

Attaching package: ‘Hmisc’

The following objects are masked from ‘package:base’:

    format.pval, round.POSIXt, trunc.POSIXt, units


Attaching package: ‘dplyr’

The following objects are masked from ‘package:Hmisc’:

    combine, src, summarize

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

Loading required package: nlme

Attaching package: ‘nlme’

The following object is masked from ‘package:dplyr’:

    collapse

The following object is masked from ‘package:forecast’:

    getResponse

This is mgcv 1.8-11. For overview type 'help("mgcv-package")'.
Loading required package: Matrix

Attaching package: ‘Matrix’

The following object is masked from ‘package:tidyr’:

    expand


Attaching package: ‘lme4’

The following object is masked from ‘package:nlme’:

    lmList


Attaching package: ‘caret’

The following object is masked from ‘package:survival’:

    cluster


Attaching package: ‘gridExtra’

The following object is masked from ‘package:dplyr’:

    combine

The following object is masked from ‘package:Hmisc’:

    combine

Loading BBSforecasting
Warning message:
In setup_ns_exports(pkg, export_all): Objects listed as exports, but not present in namespace: cleanup_multi_ts_forecasts
Attaching package: ‘raster’

The following object is masked from ‘package:nlme’:

    getData

The following object is masked from ‘package:tidyr’:

    extract

The following object is masked from ‘package:dplyr’:

    select

The following objects are masked from ‘package:Hmisc’:

    mask, zoom

Checking rgeos availability: TRUE

Attaching package: ‘maptools’

The following object is masked from ‘package:Hmisc’:

    label

rgeos version: 0.3-19, (SVN revision 524)
 GEOS runtime version: 3.5.0-CAPI-1.9.0 r4084 
 Linking to sp version: 1.2-1 
 Polygon checking: TRUE 


Attaching package: ‘rgeos’

The following object is masked from ‘package:Hmisc’:

    translate

rgdal: version: 1.1-10, (SVN revision 622)
 Geospatial Data Abstraction Library extensions to R successfully loaded
 Loaded GDAL runtime: GDAL 1.11.3, released 2015/09/16
 Path to GDAL shared files: /usr/share/gdal/1.11
 Loaded PROJ.4 runtime: Rel. 4.9.2, 08 September 2015, [PJ_VERSION: 492]
 Path to PROJ.4 shared files: (autodetected)
 Linking to sp version: 1.2-1 

 # ATTENTION: maps v3.0 has an updated 'world' map.        #
 # Many country borders and names have changed since 1990. #
 # Type '?world' or 'news(package="maps")'. See README_v3. #


Initial data setup

Load the BBS data and limit it to sites with contiguous time-series from 2000 to 2014 (the range spanned by the MODIS data).


In [2]:
start_yr <- 1982
end_yr <- 2013
min_num_yrs <- 25
richness_w_env <- get_richness_ts_env_data(start_yr, end_yr, min_num_yrs)

In [3]:
head(richness_w_env)
cat("There are", length(unique(richness_w_env$site_id)), "time-series with at least", min_num_yrs, "years of data between", start_yr, "and", end_yr)


site_idyearrichnesslatlongbio1bio2bio4bio5bio6bio10bio11bio16bio17bio18bio19ndvi_sumndvi_winndvi_annelevs
12001 1982 49 34.868688 -87.6041417 15.612916747729 12.1458334848285 765.160901860803 32.1599998474121 -2.9100000858306924.0583337148031 7.17500003178914 441.839996337891 283.299995422363 286.500003814697 398.770004272461 0.6876666666666670.3658333333333330.5605 210.126277474451
22001 1983 49 34.868688 -87.6041417 15.0962499578794 12.0424999545018 878.92348940742 34.4300003051758 -2.5299999713897725.5266666412354 6.63499983151754 711.889999389648 142.71000289917 142.71000289917 337.970008850098 0.6436666666666670.396 0.548833333333333210.126277474451
32001 1984 65 34.868688 -87.6041417 15.8524999022484 12.6483332763116 781.218674275284 31.3199996948242 -4.0399999618530323.9866669972738 6.45166659355164 428.110008239746 119.760004520416 119.760004520416 275.449993133545 0.7241666666666670.3691666666666670.565 210.126277474451
42001 1985 54 34.868688 -87.6041417 15.5324999888738 11.969999919335 890.206880304819 31.5100002288818 -5.3000001907348623.988333384196 5.71166666348775 301.029998779297 231.919998168945 301.029998779297 257.060001373291 0.7206666666666670.4165 0.595 210.126277474451
52001 1986 54 34.868688 -87.6041417 16.4687499205271 12.5474994579951 807.521006713121 34.0999984741211 -2.9900000095367425.5733331044515 8.13000011444092 567.989990234375 195.049999237061 245.440002441406 195.049999237061 0.647 0.4115 0.573208333333333210.126277474451
62001 1987 58 34.868688 -87.6041417 16.221249739329 13.2524997492631 820.299698883502 34.5299987792969 -1.3300000429153425.42999903361 7.77500009536743 337.099998474121 205.350002288818 238.249996185303 337.099998474121 0.6966666666666670.4085 0.578875 210.126277474451
There are 669 time-series with at least 25 years of data between 1982 and 2013

Maps of variables


In [4]:
states <- map_data("state")
map_year = 2009 #pick a year to map

richness_w_env_oneyear <- dplyr::filter(richness_w_env, year == map_year) %>%
  na.omit()
map_richness <- ggplot() +
  geom_polygon(data=states, aes(x=long, y=lat, group=group), color="black", fill="white") +
  geom_point(data=richness_w_env_oneyear, aes(x=long, y=lat, color=richness)) +
  scale_color_viridis() +
  coord_map()
ggsave("figures/map_richness.png", map_richness)

env_oneyear_long <- tidyr::gather(richness_w_env_oneyear, env_var, value, bio1:elevs)
maps_env_vars <- env_oneyear_long %>%
  group_by(env_var) %>%
  do(plots=ggplot() +
    geom_polygon(data=states, aes(x=long, y=lat, group=group), color="black", fill="white") +
    geom_point(data=., aes(x=long, y=lat, color=value)) +
    scale_color_viridis() +
    coord_map() +
    ggtitle(first(.$env_var))
    )
multi_panel_fig <- do.call("arrangeGrob", c(maps_env_vars$plots, ncol=4))
ggsave("figures/map_env_vars.png", multi_panel_fig, width = 20, height = 20)


Saving 6.67 x 6.67 in image

Map of Richness

Map of Environmental Variables

Forecasting

Generate forecasts for naive, average, and ARIMA time-series models for each site.


In [5]:
lag <- 10
richness_by_site <- group_by(richness_w_env, site_id)
tsmodel_forecasts <- get_ts_forecasts(richness_by_site, timecol = 'year',
                                      responsecol = 'richness',
                                      exogcols = c("ndvi_sum", "ndvi_win"), lag = lag, pred_int_levels=seq(1, 99, by=1))
head(tsmodel_forecasts$pt_est)
head(tsmodel_forecasts$intervals)


Warning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time seriesWarning message:
In ets(get_train_data(., responsecol)): Missing values encountered. Using longest contiguous portion of time series
site_idmodeltimeperiodobspt_fcast
12001 naive2004 58 63
22001 naive2005 56 63
32001 naive2006 62 63
42001 naive2007 60 63
52001 naive2008 59 63
62001 naive2009 55 63
site_idmodeltimeperiodobspt_fcastlevelslohi
12001 arima 2004 58 56.7 1 56.644606412905756.7553935870942
22001 arima 2004 58 56.7 10 56.144620441537257.2553795584628
32001 arima 2004 58 56.7 11 56.088743381528957.3112566184711
42001 arima 2004 58 56.7 12 56.032768441987357.3672315580126
52001 arima 2004 58 56.7 13 55.976686267514857.4233137324851
62001 arima 2004 58 56.7 14 55.920487379677657.4795126203224

Spatial environment-richness model prediction

White & Hurlbert 2010 linear model


In [6]:
richness_w_env_2003 <- filter(richness_w_env, year == 2003)
richness_w_env_pre_2004 <- filter(richness_w_env, year <= 2003)
richness_w_env_2004_2013 <- filter(richness_w_env, year >= 2004)
spatial_bioclim_model_2003 <- lm(richness ~ bio10 + I(bio10^2) + bio11 +
                      I(bio11^2) + bio12 + I(bio12^2), data = richness_w_env_2003)
spatial_env_model_2003 <- lm(richness ~ ndvi_sum + I(ndvi_sum^2) + ndvi_win + I(ndvi_win^2) + bio10 + I(bio10^2) + bio11 +
                      I(bio11^2) + bio12 + I(bio12^2) + elevs + I(elevs^2), data = richness_w_env_pre_2004)
fcast_spatial_bioclim <- forecast(spatial_bioclim_model_2003, newdata = richness_w_env_2004_2013)
fcast_spatial_env <- forecast(spatial_env_model_2003, newdata = richness_w_env_2004_2013, level = seq(1, 99, by=1))
fcast_spatial_bioclim_data <- cbind(richness_w_env_2004_2013, fcast_spatial_bioclim)
fcast_spatial_env_data <- cbind(richness_w_env_2004_2013, fcast_spatial_env)

fcast_spatial_bioclim_data$model <- 'spat_bioclim'
fcast_spatial_bioclim <- dplyr::select(fcast_spatial_bioclim_data,
                                   site_id, model, timeperiod = year, obs = richness,
                                   everything(), -lat, -long, -starts_with("bio"),
                                   -starts_with("ndvi"), -elevs)
fcast_spatial_bioclim <- restruct_ts_forecasts(fcast_spatial_bioclim)

fcast_spatial_env_data$model <- 'spat_env'
fcast_spatial_env <- dplyr::select(fcast_spatial_env_data,
                                   site_id, model, timeperiod = year, obs = richness,
                                   everything(), -lat, -long, -starts_with("bio"),
                                   -starts_with("ndvi"), -elevs)
fcast_spatial_env <- restruct_ts_forecasts(fcast_spatial_env)

head(fcast_spatial_env$pt_est)
head(fcast_spatial_env$intervals)


site_idmodeltimeperiodobspt_fcast
12001 spat_env 2004 58 50.8520969820016
22001 spat_env 2005 56 48.3649997230175
32001 spat_env 2006 62 48.5288018420137
42001 spat_env 2007 60 48.2016290030079
52001 spat_env 2008 59 51.4674350603092
62001 spat_env 2009 55 50.972427428738
site_idmodeltimeperiodobspt_fcastlevelslohi
12001 spat_env 2004 58 50.85209698200161 50.741297320462350.9628966435409
22001 spat_env 2004 58 50.852096982001610 49.741212341341451.9629816226618
32001 spat_env 2004 58 50.852096982001611 49.629445516004652.0747484479987
42001 spat_env 2004 58 50.852096982001612 49.517482887358452.1867110766448
52001 spat_env 2004 58 50.852096982001613 49.405305740334952.2988882236684
62001 spat_env 2004 58 50.852096982001614 49.292895113725752.4112988502776

GAM


In [7]:
high_corr_vars <- colnames(richness_w_env_pre_2004)[findCorrelation(cor(richness_w_env_pre_2004, use = "complete.obs"))]
cat("The following highly correlated variables are remove from GAM & LME modeling: ", high_corr_vars)


The following highly correlated variables are remove from GAM & LME modeling:  bio11 bio1 bio7 bio16

Environmental smoothers


In [8]:
spatial_env_gam_model <- gam(richness ~ s(ndvi_sum, bs = "ts") + s(ndvi_win, bs = "ts") + s(elevs, bs = "ts") +
                            s(bio2, bs = "ts") + s(bio3, bs = "ts") + s(bio4, bs = "ts") + s(bio5, bs = "ts") + s(bio6, bs = "ts") +
                            s(bio8, bs = "ts") + s(bio9, bs = "ts") + s(bio10, bs = "ts") + s(bio12, bs = "ts") + s(bio13, bs = "ts") +
                            s(bio14, bs = "ts") + s(bio15, bs = "ts") + s(bio17, bs = "ts") + s(bio18, bs = "ts") + s(bio19, bs = "ts"),
                            family = gaussian, data = richness_w_env_pre_2004
                            )
pt_fcast <- predict(spatial_env_gam_model, newdata = richness_w_env_2004_2013)
fcast_spatial_env_gam <- dplyr::select(fcast_spatial_env$pt_est, site_id, model, timeperiod, obs) %>%
  mutate(model="spat_env_gam") %>%
  cbind(pt_fcast)

Spatial smoother


In [9]:
spatial_env_gam_spatial_model <- gam(richness ~ ndvi_sum + ndvi_win + elevs +
                            bio2 + bio3 + bio4 + bio5 + bio6 + 
                            bio8 + bio9 + bio10 + bio12 + bio13 +
                            bio14 + bio15 + bio17 + bio18 + bio19 +
                            s(long, lat, bs = "ds"),
                            family = gaussian, data = richness_w_env_pre_2004
                            )
pt_fcast <- predict(spatial_env_gam_spatial_model, newdata = richness_w_env_2004_2013)
fcast_spatial_env_gam_spatial <- dplyr::select(fcast_spatial_env$pt_est, site_id, model, timeperiod, obs) %>%
  mutate(model="spat_env_gam_spat") %>%
  cbind(pt_fcast)
plot(spatial_env_gam_spatial_model)