Project yields for future climate scenarios using regression analysis Using average growing season temperature and precipitation, max and min months

yield_shock_projection(
  use_default_coeff = FALSE,
  climate_model = "gcm",
  climate_scenario = "rcp",
  base_year = NULL,
  start_year = NULL,
  end_year = NULL,
  smooth_window = 20,
  diagnostics = TRUE,
  output_dir = file.path(getwd(), "output")
)

Arguments

use_default_coeff

Default = FALSE. binary for using default regression coefficients. Set to TRUE will use the default coefficients instead of calculating coefficients from the historical climate data.

climate_model

Default = NULL. string for climate model (e.g., 'CanESM5')

climate_scenario

Default = NULL. string for climate scenario (e.g., 'ssp245')

base_year

Default = NULL. integer for the base year (for GCAM)

start_year

Default = NULL. integer for the start year of the data

end_year

Default = NULL. integer for the end year of the data

smooth_window

Default = 20. integer for smoothing window in years

diagnostics

Default = TRUE. Logical for performing diagnostic plot

output_dir

Default = file.path(getwd(), 'output'). String for output directory