data(ensBMAtest)
ensNames <- c("gfs","cmcg","eta","gasp","jma","ngps","tcwb","ukmo")
obs <- paste("T2","obs", sep = ".")
ens <- paste("T2", ensNames, sep = ".")
tempTestData <- ensembleData( forecasts = ensBMAtest[,ens],
observations = ensBMAtest[,obs],
station = ensBMAtest[,"station"],
dates = ensBMAtest[,"vdate"],
forecastHour = 48,
initializationTime = "00")
tempTrain <- trainingData( tempTestData, trainingDays = 30,
date = "2008010100")
tempTrainFit <- fitBMA( tempTrain, model = "normal")
## equivalent to
## tempTrainFit <- fitBMAnormal( tempTrain)
set.seed(0); exch <- sample(1:length(ens),replace=TRUE)
tempTestData <- ensembleData( forecasts = ensBMAtest[,ens],
exchangeable = exch,
observations = ensBMAtest[,obs],
station = ensBMAtest[,"station"],
dates = ensBMAtest[,"vdate"],
forecastHour = 48,
initializationTime = "00")
Run the code above in your browser using DataLab