Learn R Programming

ICAOD (version 1.0.2)

normal: Assumes A Multivariate Normal Prior Distribution for The Model Parameters

Description

Creates a multivariate normal prior distribution for the unknown parameters as an object of class cprior.

Usage

normal(mu, sigma, lower, upper)

Value

An object of class cprior that is a list with the following components:

fn

Prior distribution as an R function with argument param, which is the vector of the unknown parameters. See below.

npar

Number of unknown parameters (equal to the length of param).

lower

Lower bounds. A vector with the same length as param.

upper

Upper bounds. A vector with the same length as param.

The list will be passed to the argument prior of the function bayes. The order of the argument param in fn has the same order as the argument parvars when the model is specified by a formula. Otherwise, it is equal to the argument param in the function fimfunc.

Arguments

mu

A vector representing the mean values.

sigma

A symmetric positive-definite matrix representing the variance-covariance matrix of the distribution.

lower

A vector of lower bounds for the model parameters.

upper

A vector of upper bounds for the model parameters.

See Also

bayes sensbayes

Examples

Run this code
normal(mu =  c(0, 1), sigma = matrix(c(1, -0.17, -0.17, .5), nrow = 2),
  lower =  c(-3, .1), upper = c(3, 2))

Run the code above in your browser using DataLab