setPredCalibration<- {EBMAforecast} | R Documentation |
"Set" functions
Description
To assign individual slots, use set functions
Usage
setPredCalibration(object) <- value
## S4 replacement method for signature 'ForecastData'
setPredCalibration(object) <- value
setPredTest(object) <- value
## S4 replacement method for signature 'ForecastData'
setPredTest(object) <- value
setOutcomeCalibration(object) <- value
## S4 replacement method for signature 'ForecastData'
setOutcomeCalibration(object) <- value
setOutcomeTest(object) <- value
## S4 replacement method for signature 'ForecastData'
setOutcomeTest(object) <- value
setModelNames(object) <- value
## S4 replacement method for signature 'ForecastData'
setModelNames(object) <- value
Arguments
object |
The object to which values are assigned. |
value |
Values to be assigned. |
Value
A data object of the class 'ForecastData' with the following slots:
predCalibration |
An array containing the predictions of all component models for all observations in the calibration period. |
predTest |
An array containing the predictions of all component models for all observations in the test period. |
outcomeCalibration |
A vector containing the true values of the dependent variable for all observations in the calibration period. |
outcomeTest |
A vector containing the true values of the dependent variable for all observations in the test period. |
modelNames |
A character vector containing the names of all component models. If no model names are specified, names will be assigned automatically. |
Author(s)
Michael D. Ward <michael.d.ward@duke.edu> and Jacob M. Montgomery <jacob.montgomery@wustl.edu> and Florian M. Hollenbach <florian.hollenbach@tamu.edu>
References
Montgomery, Jacob M., Florian M. Hollenbach and Michael D. Ward. (2012). Improving Predictions Using Ensemble Bayesian Model Averaging. Political Analysis. 20: 271-291.
Montgomery, Jacob M., Florian M. Hollenbach and Michael D. Ward. (2015). Calibrating ensemble forecasting models with sparse data in the social sciences. International Journal of Forecasting. 31:930–942.#'
Examples
## Not run:
data(calibrationSample)
data(testSample)
setPredCalibration(this.ForecastData)<-calibrationSample[,c("LMER", "SAE", "GLM")]
setOutcomeCalibration(this.ForecastData)<-calibrationSample[,"Insurgency"]
setPredTest(this.ForecastData)<-testSample[,c("LMER", "SAE", "GLM")]
setOutcomeTest(this.ForecastData)<-testSample[,"Insurgency"]
setModelNames(this.ForecastData)<-c("LMER", "SAE", "GLM")
## End(Not run)