Learn R Programming

ForecastFramework (version 0.10.3)

SimpleForecast: SimpleForecast

Description

A basic concrete SimulatedForecast class.

Arguments

Fields

data

The data used to create the forecast.

forecastMadeTime

When the forecast was created.

forecastTimes

The times the forecast is about.

model

The model used to create the forecast.

Methods

binDist(cutoffs)

This throws an error. This method is not meaningful for this data.

debug(string)

A function for debugging the methods of this class. It calls the browser command. In order for methods to opt into to debugging, they need to implement the following code at the beginning: if(<method_name> %in% private$.debug){browser()}. This method exists, because the debugger is not always intuitive when it comes to debugging R6 methods.

initialize(data,forecastTimes)

Create a new SimpleForecast.

mean()

This method returns the data. It is included for compliance.

Value

a MatrixData.

median()

This method returns the data. It is included for compliance.

Value

a MatrixData.

quantile(alphas,na.rm=FALSE)

This throws an error. This method is not meaningful for this data.

Value

an ArrayData.

undebug(string)

A function for ceasing to debug methods. Normally a method will call the browser command every time it is run. This command will stop it from doing so.

See Also

Inherits from : Forecast

Examples

Run this code
# NOT RUN {
data = IncidenceMatrix$new(matrix(1:9,3,3))
forecast = SimpleForecast$new(data,forecastTimes=c(FALSE,FALSE,TRUE))
forecast
forecast$forecastTimes
forecast$forecastMadeTime
forecast$data$mat
forecast$nsim
forecast$mean()$mat
forecast$median()$mat

# }

Run the code above in your browser using DataLab