# Example 1: Generate forecast with artifical observations
# Seasonal prediction example
a <- 0.1
b <- 0.3
g <- 1
sig <- 1
t <- 0.02
ntd <- 30
nlt <- 4
nm <- 10
toyforecast <- ToyModel(alpha = a, beta = b, gamma = g, sig = sig, trend = t,
nstartd = ntd, nleadt = nlt, nmemb = nm)
# Example 2: Generate forecast from loaded observations
# Decadal prediction example
startDates <- c('19851101', '19901101', '19951101', '20001101', '20051101')
sampleData <- LoadSampleData(startDates, output = 'areave')
a <- 0.1
b <- 0.3
g <- 1
nm <- 10
toyforecast <- ToyModel(alpha = a, beta = b, gamma = g, nmemb = nm,
obsini = sampleData$obs, nstartd = 5, nleadt = 60)
# \donttest{
PlotAno(toyforecast$mod, toyforecast$obs, startDates,
toptitle = c("Synthetic decadal temperature prediction"),
fileout = "ex_toymodel.eps")
# Clean-up
unlink("ex_toymodel.eps")
# }
Run the code above in your browser using DataLab