Learn R Programming

ensembleBMA (version 5.1.8)

modelParameters: Extract model parameters

Description

Extracts model parameters for ensemble forecasting models.

Usage

modelParameters( fit, ...)

Value

A list of parameters (including weights) corresponding to the ensemble forecasting model for the specified dates. The list may also include a power by which the forecasts were transformed to obtain the model parameters.

Arguments

fit

A model fit to ensemble forecasting data.

...

For ensemble fits involving dates, there is an additional dates argument, giving a character representation of the dates for which model parameters are desired. In this case dates must correspond to the models in the fit and the default is to give the model parameters for all available dates.

See Also

ensembleBMAgamma, ensembleBMAgamma0, ensembleBMAnormal, fitBMAgamma, fitBMAgamma0, fitBMAnormal

Examples

Run this code
  data(ensBMAtest)

  ensMemNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo")

  obs <- paste("T2","obs", sep = ".")
  ens <- paste("T2", ensMemNames, sep = ".")

  tempTestData <- ensembleData( forecasts = ensBMAtest[,ens],
                                dates = ensBMAtest[,"vdate"],
                                observations = ensBMAtest[,obs],
                                station = ensBMAtest[,"station"],
                                forecastHour = 48,
                                initializationTime = "00")

if (FALSE)  # R check
  tempTestFit <- ensembleBMAnormal( tempTestData, trainingDays = 30)


  modelParameters( tempTestFit, date = "2008010100")

  tempTrain <- trainingData( tempTestData, date = "2008010100",
                             trainingDays = tempTestFit$training$days)

  tempTrainFit <- fitBMAnormal( tempTrain)

  modelParameters( tempTrainFit)

Run the code above in your browser using DataLab