rnodeDAGWishart {BCDAG} R Documentation

## Draw one observation from a Normal-Inverse-Gamma distribution (internal function)

### Description

This function performs one draw from the Multivariate-Normal-Inverse-Gamma (prior/posterior) distribution of the parameters of a Normal linear regression model. Response variable is node and covariates are given by the parents of node in DAG. It is implemented node-by-node in rDAGWishart to obtain draws from a compatible (prior/posterior) DAG-Wishart distribution.

### Usage

rnodeDAGWishart(node, DAG, aj, U)


### Arguments

 node numerical label of the node in DAG DAG (q,q) adjacency matrix of the DAG aj common shape hyperparameter of the compatible DAG-Wishart, a > q - 1 U position hyperparameter of the compatible DAG-Wishart, a (q, q) s.p.d. matrix

### Value

A list with two elements; a vector with one draw for the (vector) regression coefficient and a scalar with one draw for the conditional variance

[Package BCDAG version 1.0.0 Index]