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 |
Partha Deb <partha.deb@hunter.cuny.edu> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Conditional expectations for each latent class with gllapred |

Date |
Thu, 30 Dec 2010 12:21:02 -0500 |

Stas and Kristian,

Hope this helps. Happy New Year to all. cheers. Partha On 12/30/2010 10:37 AM, Stas Kolenikov wrote:

On Thu, Dec 30, 2010 at 3:06 AM, Kristian Karlson <kristian.karlson@gmail.com> wrote:I have run the following -gllamm- model in Stata. It is a finite mixture binary logit model with two latent classes: use http://www.ats.ucla.edu/stat/paperexamples/singer/hsb12.dta, clear sample 25 gllamm union age grade year, i(idcode) ip(f) nip(2) l(logit) f(binom) I am interested in the conditional expectation for latent class: Pr(Union = 1 | u_1) and Pr(Union = 1 | u_2), where u_1 is latent class 1 and u_2 is latent class 2. I have looked at -gllapred-, but haven't been able to compute these. My idea was to use options mu and marg, but these probabilities are the mixed probabilities, not the ones from each component.Your example does not run: . gllamm union age grade year, i(idcode) ip(f) nip(2) l(logit) f(binom) variable union not found r(111); You probably meant a different data set. Note that this is a pretty restrictive model in which the effects of the predictors are kept constant across classes, and the difference is only via a shift. You might be able to manipulate -gllapred- using -from()- option. For that, you can create two matrices with the estimated point masses and their weights fixed to one and the other class. Just a suggestion, I never worked with mixture models using -gllamm-. Your other option is to use -fmm- package that might provide additional flexibility if it supports -logit- link (or an analogue of).

-- Partha Deb Professor of Economics Director of Graduate Studies Hunter College ph: (212) 772-5435 fax: (212) 772-5398 http://urban.hunter.cuny.edu/~deb/ Emancipate yourselves from mental slavery None but ourselves can free our minds. - Bob Marley * * 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/

**References**:**st: Conditional expectations for each latent class with gllapred***From:*Kristian Karlson <kristian.karlson@gmail.com>

**Re: st: Conditional expectations for each latent class with gllapred***From:*Stas Kolenikov <skolenik@gmail.com>

- Prev by Date:
**Re: st: estat overid & sample weights** - Next by Date:
**Re: st: Person-year files, survival analysis, and sample weights** - Previous by thread:
**Re: st: Conditional expectations for each latent class with gllapred** - Next by thread:
**[no subject]** - Index(es):