Description Usage Arguments Value Author(s) Examples
mcmcRun_Normal_DPM: MCMC sampler for IV Analysis with Dirichlet process mixture prior on the errors and Normal prior on the latent factors
1 | mcmcRun_Normal_DPM(Yobs, Tr, X, Z, niter, priors = NULL, initialVals = NULL)
|
Yobs |
: Input numeric vector of observed outcome of length n, can be binary or continuous. |
Tr |
: Binary numeric vector of treatment indicator. |
X |
: numeric matrix of covariates of dimension n-By-p |
Z |
: numeric vector of instrumental variable of length n |
niter |
: number of MCMC sampler to be run |
priors: |
list to specify the parameters for the prior distribution. If NULL, default specification is used. |
initialVals: |
list of initial values for each parameter. If NULL, default setting for initialization is used. |
runModel : list of posterior samples for each parameter
Sam Adhikari
1 2 3 | {
obj = mcmcRun_Normal_DPM(Yobs=Yobs,Tr=D,X=X[,-1],Z=Z,niter=10,priors=NULL,initialVals=NULL)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.