input_model_mvnormal_iw: input_model_mvnormal_iw

Description Usage Arguments Value See Also

View source: R/input_model_mvnormal_iw.R

Description

Multivariate Normal - Inverse Wishart model. Fits num_models Multivariate Normal distributions to a data frame according to Multivariate Normal - Inverse Wishart model. If prior is not passed to the function, classic Multivariate Normal model with sample covariance is used.

Usage

1
input_model_mvnormal_iw(data, num_models, prior)

Arguments

data

Data frame of events with attributes to model jointly.

num_models

Number of distributions to fit.

prior

List of lists containing priors for mean and covariance matrix. Should contain entries 'mean' and 'sigma'. Inner list corresponding to entry 'mean' should specify parameters for the multivariate normal prior of the mean. It's entries should be 'mean' (vector) and 'sigma' (matrix) of the appropriate size. List corresponding to the outer list key 'sigma' should specify parameters for the Inverse Wishart prior of the covariance matrix. Keys in this list should be 'a' (scalar) and 'S' (matrix). For example: list(mean = list(mean = .., sigma = ..), sigma = list(a = .., S = ..)), values are omitted for clarity.

Value

List of num_models S3 classes of type 'mvnormal'. The class 'mvnormal' has the following methods defined: mean and sample. These both sample from the posterior distribution of the mean of the multivariate distribution fit.

See Also

Other input models: input_model_bernoulli, input_model_normal_ig, input_model_normal, input_model_poisson


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