generateWeather: Generate multivariate weather series using a Bayesian Network...

View source: R/generateWeather.R

generateWeatherR Documentation

Generate multivariate weather series using a Bayesian Network Weather Generator.

Description

Uses a Bayesian network model, output from buildWeatherGenerator() to simulate a multivariate series. If the model was learnt without predictors, x must be NULL. Otherwise x is required.

Usage

generateWeather(
  wg,
  initial = NULL,
  n = 1,
  x = NULL,
  inference.type = NULL,
  initial.date = NULL,
  advance.type = "simulation",
  threshold.vector = 0.5,
  resample.size = 10000,
  event = "1"
)

Arguments

wg

Bayesian network weather generator model, as output from buildWeatherGenerator()

initial

An initial observation, as vector. If NULL, a random observation will be chosen.

n

Number of observations to generate.

x

A predictors object (grid)

inference.type

Either "approximate" or "exact". If junction tree is unavailable, exact inference is deactivated

initial.date

A date element. If provided, rownames will be labeled after this date.

advance.type

"simulation" (default) is used to generate stochastic weather series. Other options are included for debugging purposes, which are "exact", so that the series are generated deterministically using most likely and threshold.vector.

threshold.vector

Ignored if advance.type = "simulation", used as the threshold for deciding if probability value should be 1 or 0.

event

Name of the positive event.


MNLR/BNWeatherGen documentation built on June 2, 2023, 9:02 p.m.