Description Usage Arguments Details Value References See Also Examples

Fits a censored and shifted gamma EMOS model to ensemble forecasts for specified dates.

1 2 3 | ```
ensembleMOScsg0(ensembleData, trainingDays, consecutive = FALSE,
dates = NULL, control = controlMOScsg0(),
warmStart = FALSE, exchangeable = NULL)
``` |

`ensembleData` |
An |

`trainingDays` |
An integer giving the number of time steps (e.g. days) in the training period. There is no default. |

`consecutive` |
If |

`dates` |
The dates for which EMOS forecasting models are desired.
By default, this will be all dates in |

`control` |
A list of control values for the fitting functions specified via the function controlMOScsg0. For details and default values, see controlMOScsg0. |

`warmStart` |
If |

`exchangeable` |
A numeric or character vector or factor indicating groups of
ensemble members that are exchangeable (indistinguishable).
The modeling will have equal parameters within each group.
The default determines exchangeability from |

Given an ensemble of size *m*: *X_1, … , X_m*, the
following shifted gamma model left-censored at 0
is fit by `ensembleMOScsg0`

:

*Y ~ Gamma_0(κ,θ,q)*

where *Gamma_0* denotes the shifted gamma distribution left-censored at zero,
with shape *κ*, scale *θ* and shift *q*. The model is
parametrized such that the mean *κθ* is a linear function
*a + b_1 X_1 + … + b_m X_m*
of the ensemble forecats, and the variance *κθ^2* is a linear
function of the ensemble mean *c+d \overline{f}*, see Baran and Nemoda (2016)
for details.

`B`

is a vector of fitted regression coefficients: *b_1,
…, b_m*. Specifically, *a, b_1,…, b_m, c, d, q* are
fitted to optimize
`control$scoringRule`

over the specified training period using
`optim`

with `method = control$optimRule`

.

A list with the following output components:

`training` |
A list containing information on the training length and lag and the number of instances used for training for each modeling date. |

`a` |
A vector of fitted EMOS intercept parameters for each date. |

`B` |
A matrix of fitted EMOS coefficients for each date. |

`c,d` |
The fitted parameters for the variance, see details. |

`q` |
Fitted shift parameter, see details. |

M. Scheuerer and T. M. Hamill, Statistical post-processing of ensemble precipitation
forecasts by fitting censored, shifted gamma distributions.
*Monthly Weather Review* 143:4578–4596, 2015.

S. Baran and D. Nemoda, Censored and shifted gamma distribution based EMOS
model for probabilistic quantitative precipitation forecasting.
*Environmetrics* 27:280–292, 2016.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
data("ensBMAtest", package = "ensembleBMA")
ensMemNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo")
obs <- paste("PCP24","obs", sep = ".")
ens <- paste("PCP24", ensMemNames, sep = ".")
prcpTestData <- ensembleData(forecasts = ensBMAtest[,ens],
dates = ensBMAtest[,"vdate"],
observations = ensBMAtest[,obs],
station = ensBMAtest[,"station"],
forecastHour = 48,
initializationTime = "00")
fitDates <- c("2008010100", "2008010200")
prcpTestFitGEV0 <- ensembleMOSgev0(prcpTestData, trainingDays = 25,
dates = fitDates)
``` |

```
Loading required package: ensembleBMA
Loading required package: chron
Loading required package: evd
Attaching package: 'ensembleMOS'
The following objects are masked from 'package:ensembleBMA':
brierScore, cdf, crps, quantileForecast, trainingData
modeling for date 2008010100 ...
(Intercept) PCP24.gfs PCP24.cmcg PCP24.eta PCP24.gasp PCP24.jma
-0.19 0.07 0.00 0.11 0.04 0.30
PCP24.ngps PCP24.tcwb PCP24.ukmo
0.21 0.01 0.03 0.02
0.15 0.64 -0.37
modeling for date 2008010200 ...
(Intercept) PCP24.gfs PCP24.cmcg PCP24.eta PCP24.gasp PCP24.jma
-0.29 0.36 0.04 0.09 0.01 0.14
PCP24.ngps PCP24.tcwb PCP24.ukmo
0.12 0.02 0.08 0.31
0.05 1.61 -0.51
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.