Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down at the end of May, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Fernando Luco <flucoestatalist@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Evaluate cdf and pdf of mixture of normals |

Date |
Thu, 1 Sep 2011 14:57:57 -0500 |

Dear statalisters, I'm trying to compute the cdf and pdf of a mixture of normals but the specifics of my problem are doing this quite difficult, so any ideas would be really appreciated. My data, and what I want to do is as follows. I have i people that may or may not be present at t situations. Each person has two variables associated, y(it) and x(it). I assume that the distribution of y(it) satisfies y(it)=x(it)+e(it) where the distribution of e(it) is a mixture of normals. Let's assume that is only a mixture of two normals to make it easy and that they have means mu1 and mu2 and std. dev sigma1 and sigma2, and are independent. I have the means, variances and mixing probabilities of the distribution of e(it). So, my data is t, i, y(it) and x(it). I have heterogeneity between people so the distributions of y(i) differ among people, in particular, the mean changes. So, for example, when considering the cdf of person 1 the mean should be x11 plus the two means of the normal distributions (I guess that they enter weighted by the mixing probabilities), for situation 1, but for situation 2 then the mean should be x12 plus the weighted means. For person 2 the mean would be x21 plus the weighted means of the normals for situation one, and x22 for situation two, etc. The variance is common. I want to evaluate the cdf and the pdf at y(it). Finally, not every people are present in every t. So, when person i is not present then the cdf and pdf should be empty. Does anybody know how I can compute this in Stata? Thanks in advanced, Fernando * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: Evaluate cdf and pdf of mixture of normals***From:*"Feiveson, Alan H. (JSC-SK311)" <alan.h.feiveson@nasa.gov>

- Prev by Date:
**Re: st: tabstatmat question** - Next by Date:
**Re: st: tabstatmat question** - Previous by thread:
**st: tabstatmat question** - Next by thread:
**st: RE: Evaluate cdf and pdf of mixture of normals** - Index(es):