sim_mvgam | R Documentation |
This function simulates sets of time series data for fitting a multivariate GAM that includes shared seasonality and dependence on state-space latent dynamic factors. Random dependencies among series, i.e. correlations in their long-term trends, are included in the form of correlated loadings on the latent dynamic factors
sim_mvgam(
T = 100,
n_series = 3,
seasonality = "shared",
use_lv = FALSE,
n_lv = 0,
trend_model = "RW",
drift = FALSE,
prop_trend = 0.2,
trend_rel,
freq = 12,
family = poisson(),
phi,
shape,
sigma,
nu,
mu,
prop_missing = 0,
prop_train = 0.85
)
T |
|
n_series |
|
seasonality |
|
use_lv |
|
n_lv |
|
trend_model |
See mvgam_trends for more details |
drift |
|
prop_trend |
|
trend_rel |
Deprecated. Use |
freq |
|
family |
|
phi |
|
shape |
|
sigma |
|
nu |
|
mu |
|
prop_missing |
|
prop_train |
|
A list
object containing outputs needed for mvgam
, including 'data_train' and 'data_test',
as well as some additional information about the simulated seasonality and trend dependencies
# Simulate series with observations bounded at 0 and 1 (Beta responses)
sim_data <- sim_mvgam(family = betar(), trend_model = RW(), prop_trend = 0.6)
plot_mvgam_series(data = sim_data$data_train, series = 'all')
# Now simulate series with overdispersed discrete observations
sim_data <- sim_mvgam(family = nb(), trend_model = RW(), prop_trend = 0.6, phi = 10)
plot_mvgam_series(data = sim_data$data_train, series = 'all')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.