Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: component order for fmm


From   YANNAN SHEN <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: component order for fmm
Date   Tue, 21 Aug 2012 12:16:55 -0400

Scott,
Thank you so much for your reply and advice! It matters because I try to use the fmm identification to assign stocks into two portfolios- the portfolio that consists higher constant  stocks and the one with lower constant stocks.

I am running the fmm command every month and with shuffled identification, I need to check and edit my result data to make sure they are in the right place. 

I appreciate your help very much but I cannot help asking a question: I know initial values are important for EM algorithm and different starting points may lead to different results, will this somewhat alter my results?
 Thanks!
Best

Sent from my iPhone

On Aug 21, 2012, at 8:24 AM, Scott Merryman <[email protected]> wrote:

> Why does the order of the components matter?  Also, you should mention
> that Partha Deb's -fmm- and Joerg Luedicke's -fmmlc-  are from ssc.
> 
> One way would be to change the initial values.  For example:
> 
> clear
> set seed 891234
> set obs 3
> gen id = _n
> expand 100
> gen y = rnormal(50,10) if id == 1
> replace y = rnormal(100,10) if id == 2
> replace y = rnormal(150,10) if id == 3
> fmm y , components(3) mix(normal) from(50 100 150 1 1 1 1 1)
> fmm y , components(3) mix(normal) from(50 150 100 1 1 1 1 1)
> fmm y , components(3) mix(normal) from(150 100 50 1 1 1 1 1)
> 
> Scott
> 
> 
> On Mon, Aug 20, 2012 at 7:15 PM, yannan shen <[email protected]> wrote:
>> Hi all,
>> I am working on some panel data (stocks by month)
>> Every year, I am using the fmm package to identify stocks return into
>> groups. And then I am using the fmmlc, savec savep command to save up
>> the result.
>> My code looks like this
>> 
>> keep if  obs==67  *obs 67 =06/1998
>> fmm  ro_cons, components(2) mix(normal)
>> fmmlc, savec savep
>> fmm  ro_cons, components(3) mix(normal)
>> fmmlc, savec savep
>> 
>> what I care is _b[_cons] the coefficient for the intercept.
>> However, I noticed that for some years _b[_cons group1]>_b[_cons
>> group2], and sometimes, it's the other way around.
>> It there anyway I can put a constraint to this command and make sure
>> the intercept term for group 1 is always greater than intercept for
>> group2?
> *
> *   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/

*
*   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/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index