Model:
\(x=z'\delta + e1\).
\(y=\beta*x + w'\gamma + e2\).
\(e1,e2\) \(\sim\) \(N(\theta_{i})\). \(\theta_{i}\) represents \(\mu_{i},\Sigma_{i}\)
Note: Error terms have non-zero means. DO NOT include intercepts in the z or w matrices. This is different
from rivGibbs
which requires intercepts to be included explicitly.
Priors:
\(\delta\) \(\sim\) \(N(md,Ad^{-1})\). \(vec(\beta,\gamma)\) \(\sim\) \(N(mbg,Abg^{-1})\)
\(\theta_{i}\) \(\sim\) \(G\)
\(G\) \(\sim\) \(DP(alpha,G_{0})\)
\(G_{0}\) is the natural conjugate prior for \((\mu,\Sigma)\):
\(\Sigma\) \(\sim\) \(IW(nu,vI)\) and \(\mu|\Sigma\) \(\sim\) \(N(0,\Sigma (x) a^{-1})\)
These parameters are collected together in the list \(\lambda\). It is highly
recommended that you use the default settings for these hyper-parameters.
\(\lambda(a,nu,v):\)
\(a\) \(\sim\) uniform[alim[1],alimb[2]]
\(nu\) \(\sim\) dim(data)-1 + exp(z)
\(z\) \(\sim\) uniform[dim(data)-1+nulim[1],nulim[2]]
\(v\) \(\sim\) uniform[vlim[1],vlim[2]]
\(alpha\) \(\sim\) \((1-(alpha-alpha_{min})/(alpha_{max}-alpha{min}))^{power}\)
where \(alpha_{min}\) and \(alpha_{max}\) are set using the arguments in the reference
below. It is highly recommended that you use the default values for the hyperparameters
of the prior on alpha
List arguments contain:
Data:
z
matrix of obs on instruments
y
vector of obs on lhs var in structural equation
x
"endogenous" var in structural eqn
w
matrix of obs on "exogenous" vars in the structural eqn
Prior:
md
prior mean of delta (def: 0)
Ad
pds prior prec for prior on delta (def: .01I)
mbg
prior mean vector for prior on beta,gamma (def: 0)
Abg
pds prior prec for prior on beta,gamma (def: .01I)
Prioralpha:
Istarmin
expected number of components at lower bound of support of alpha (def: 1)
Istarmax
expected number of components at upper bound of support of alpha
power
power parameter for alpha prior (def: .8)
lambda_hyper:
alim
defines support of a distribution,def:c(.01,10)
nulim
defines support of nu distribution, def:c(.01,3)
vlim
defines support of v distribution, def:c(.1,4)
MCMC:
R
number of MCMC draws
keep
MCMC thinning parm: keep every keepth draw (def: 1)
nprint
print the estimated time remaining for every nprint'th draw (def: 100)
maxuniq
storage constraint on the number of unique components (def: 200)
SCALE
scale data (def: TRUE)
gridsize
gridsize parm for alpha draws (def: 20)
output includes object nmix
of class "bayesm.nmix" which contains draws of predictive distribution of
errors (a Bayesian analogue of a density estimate for the error terms).
nmix:
note: in compdraw list, there is only one component per draw