input_model_normal_ig: input_model_normal_ig

Description Usage Arguments Value See Also

View source: R/input_model_normal.R View source: R/input_model_normal_ig.R

Description

Fits num_samples normal models according to normal - inverse gamma model.

Normal - Inverse Gamma model. Jointly models mean and variance of a normal distribution.

Usage

1
2
3
input_model_normal_ig(data, num_models, prior)

input_model_normal_ig(data, num_models, prior)

Arguments

data

Numerical vector of data points.

num_models

Number of distributions to fit.

prior

List of two lists with keys 'mean' and 'var'. List corresponding to key 'mean' needs to have entries 'mu' (mean of the prior mean distribution) and 'k' (variance scaler). List corresponding to key 'var' needs to have entries 'a' and 'b' corresponding to rate and scale of the inverse gamma prior for variance. For example: list(mean = list(mu = 10, k = 2), var = list(a = 5, b = 2)).

prior

List containing the parameters for Normal prior distribution of the mean and Inverse Gamma prior distribution for the variance. For example: list(mean = list(mu = 10, k = 2), var = list(a = 5, b = 3).

Value

List of num_samples S3 classes of type 'normal'. The class 'normal' has the following methods defined: mean, sample and var.

List of num_models S3 classes of type 'normal'. The class 'normal' has the following methods defined: mean, sample and var.

See Also

Other input models: input_model_bernoulli, input_model_mvnormal_iw, input_model_normal, input_model_poisson

Other input models: input_model_bernoulli, input_model_mvnormal_iw, input_model_normal, input_model_poisson


fortunar/matchForecast documentation built on May 27, 2019, 3:30 p.m.