MarginalEvid_FullBayesian: MarginalEvid

Description Usage Arguments Details Value Author(s) Examples

View source: R/MarginalEvid_FullBayesian.R

Description

Calculating the marginal evidence for the data

Usage

1
2
3
4
5
6
7
8
MarginalEvid_FullBayesian(
  Data_Y,
  Data_time,
  nu0 = 1,
  Lambda0 = 1,
  Sigma0 = 1,
  Beta0 = NULL
)

Arguments

Data_Y

This is observed multi-responses (nsamples x nsites)

Data_time

This is observed times (nsamples vector)

nu0

degrees of freedom hyperparameter of invWishart prior distribution (should be 0=non-informative or 1=informative)

Lambda0

Scale matrix hyperparameter of invWishart prior distribution of Covariance (can be numeric or matrix)

Sigma0

Covariance hyperparameter of Normal prior distribution of beta (can be numeric, 2 or 3 long vector)

Beta0

Mean hyperparameter of Normal prior distribution of beta (can be 2 long vector or matrix)

Details

This function provides the marginal evidence value based on all the data

Model: A full Bayesian model (takes into account the uncertainty of the parameters) p(Y|time) = int_theta p(Y|time,theta)p(theta) d_theta Where p(Y|time,theta)=MVN(b0 + b1*time, SIGMA), SIGMA= COVARIANCE MATRIX with latent priors 'normal-invWishart' p(b0,b1|SIGMA)=MVN(0,0, diag(sig0 SIGMA,sig1 SIGMA)) p(SIGMA) = invWishart(Lambda0,nu0), where diag(Lambda0) = lam0

Marginal evidence p(Y|eta) = int_theta p(Y|theta)p(theta|eta)d theta

Value

The numerical marginal evidence

Author(s)

Oyvind Bleka

Examples

1
2
3
4
5
6
7
8
## Not run:  
n = 100
dat = genData(n,seed=1)
Data_Y = dat$Data_Y
Data_time = dat$Data_time
modelEvid = MarginalEvid_FullBayesian(Data_Y, Data_time)

## End(Not run)

oyvble/TSDpredict documentation built on June 28, 2020, 10:42 a.m.