Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mixDenBi

Compute Bivariate Marginal Density for a Normal Mixture


Description

mixDenBi computes the implied bivariate marginal density from a mixture of normals with specified mixture probabilities and component parameters.

Usage

mixDenBi(i, j, xi, xj, pvec, comps)

Arguments

i

index of first variable

j

index of second variable

xi

grid of values of first variable

xj

grid of values of second variable

pvec

normal mixture probabilities

comps

list of lists of components

Details

length(comps) is the number of mixture components
comps[[j]] is a list of parameters of the jth component
comps[[j]]$mu is mean vector
comps[[j]]$rooti is the UL decomp of Σ^{-1}

Value

An array (length(xi)=length(xj) x 2) with density value

Warning

This routine is a utility routine that does not check the input arguments for proper dimensions and type.

Author(s)

Peter Rossi, Anderson School, UCLA, perossichi@gmail.com.

References

For further discussion, see Chapter 3, Bayesian Statistics and Marketing by Rossi, Allenby, and McCulloch.
http://www.perossi.org/home/bsm-1

See Also


bayesm

Bayesian Inference for Marketing/Micro-Econometrics

v3.1-4
GPL (>= 2)
Authors
Peter Rossi <perossichi@gmail.com>
Initial release
2019-10-14

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.