Description Usage Arguments Value Examples
View source: R/compare_multiple_realizations.R
Generate Multiple Realizations of a model Useful for checking model appropriateness
1 2 3 4 5 6 7 8 9 10 11 12 13 | generate_multiple_realization(
x,
phi = 0,
theta = 0,
d = 0,
s = 0,
vara = NA,
n.realizations = 4,
lag.max = 25,
seed = NA,
model_name = "Custom Model",
return = "all"
)
|
x |
The actual time series realization |
phi |
'phi' values for the AR portion of the model (Default = 0) |
theta |
'theta' values for the AR portion of the model (Default = 0) |
d |
'd' value for the ARIMA portion of the model (Default = 0) |
s |
seasonality 's' of the ARIMA portion of the model (Default = 0) |
vara |
The white noise variance of the model |
n.realizations |
The number of hypothetical realizations to create for the model (Default = 4) |
lag.max |
The maximum amount of lag data to capture (Default = 25) |
seed |
The seed to use for reproducibility |
model_name |
The name to be assigned to the model (Default = "Custom Model") |
return |
What values to return (Default = 'all') 'all': Returns the actual along with the hypothetical realization data 'actual': Returns only the actual realization data 'hypothetical': Returns only the hypothetical realization data |
Named list with 'data' and 'results' 'data' contains the actual and the hypothetical realizations in tidy data format (appropriate for plotting) 'results' contain the ACF and Spectral Density values for the actual and hypothetical realizations in tidy data format
1 2 3 4 5 6 7 | library(tswge)
data("sunspot.classic")
est = est.arma.wge(sunspot.classic,p=8)
r = generate_multiple_realization(x = sunspot.classic,
phi = est$phi, theta = est$theta, vara = est$avar,
seed = 11)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.