mnix_pred: Genenerate random draws from the mNIX predictive...

Description Usage Arguments Details Value

View source: R/mnix_pred.R

Description

Genenerate random draws from the mNIX predictive distribution.

Usage

1
mnix_pred(n, Xpred, lambda, Omega, nu, tau, y, X, id)

Arguments

n

Number of random draws (integer).

Xpred

Covariate matrix of size n x p to use for the predictive distribution.

lambda

Mean parameter. A vector of length p, or a matrix of size n x p.

Omega

Precision matrix parameter. A matrix of size p x p, or an array of size p x p x n.

nu

Degrees-of-freedom parameter. A scalar or a vector of length n.

tau

Scale parameter. A scalar or a vector of length n.

y

Optional response vector of length N (see Details).

X

Optional covariate matrix of size N x p (see Details).

id

Optional subject identifier vector of length N with nsub <= N distinct elements (see Details).

Details

If y, X and id are unspecified, then (beta, sigma) are drawn from mNIX(lambda, Omega, nu, tau). Otherwise, they are drawn from the posterior mNIX distribution p(beta, sigma | y, X, id, lambda, Omega, nu, tau). In this case, the number of subjects nsub must be n or 1.

Value

A vector of n draws from the predictive distribution.


mlysy/losmix documentation built on Jan. 18, 2021, 5:56 a.m.