Thanks for reply, Moshe.
let's assume that the latent class model is the simplest one, 1 Y with
gaussian distribution, 1 X, and 2 latent classes (A and B). Of course
we can't assume that all my cases are from one class. Otherwise, why
do I need to use latent class model?
for each latent class, we have a model such that Y = Beta * X and beta
is the coefficient.
i am not sure if this is specific enough.
On Nov 8, 2007 8:28 PM, Moshe Olshansky <m_olshansky at yahoo.com>
wrote:> Hi,
>
> Could you be more specific: what is your model?
> Do you assume that ALL your observations are from
> class j with probability Pj? What do you mean by
> coefficients - distribution parameters?
> If this is so then what you are doing is Bayes Rule
> and it is all right (if F(X)i is the
> probability/density of X under distribution i, where X
> is the vector of all your observations).
>
> Regards,
>
> Moshe.
>
>
> --- Wensui Liu <liuwensui at gmail.com> wrote:
>
> > Dear Listers,
> > My post might be somewhat OT.
> > Currently, I am trying to use flexmix to build a
> > finite mixture model.
> > For instance, I am getting the prior probability and
> > coefficients for
> > each latent class from training data. Is there a way
> > to get the
> > posterior probablity and prediction of a new
> > dataset?
> > What I am thinking is to apply the prior prob and
> > coefficient from
> > training set to testing data such that
> >
> > Post-Prob of Class j = Prior-Prob of Class j * F(X)j
> > / sum(Prior-Prob
> > of Class i * F(X)i) for i in [1, K]
> > &
> > prediction = sum(prediction for class i * post-prob)
> > for i in [1, K].
> >
> > However, I am not sure if this is correct. Any
> > insight?
> > Thanks a lot!
> >
> > --
> > ==============================> > WenSui Liu
> > Statistical Project Manager
> > ChoicePoint Precision Marketing
> > (http://spaces.msn.com/statcompute/blog)
> >
> > ______________________________________________
> > R-help at r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> > http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained,
> > reproducible code.
> >
>
>
--
==============================WenSui Liu
Statistical Project Manager
ChoicePoint Precision Marketing
(http://spaces.msn.com/statcompute/blog)