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: 2 dimensional graph for joint distribution


From   Lulu Zeng <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: 2 dimensional graph for joint distribution
Date   Fri, 1 Nov 2013 15:04:50 +1100

Dear David, Alfonso and others,

Thank you for your comments.

My understanding of the fixed mass point choice model (using EM
algorithm) is that -- share here is the individual probability of odo
and bill (share is the same for odo and bill), not the joint
probability.

odo and bill are independent draws (using the mdraws command),
therefore the joint probability is the product of their individual
probability.

Please let me know if I have misunderstood the model. But if share is
the joint probability, then it would be just a colum vector, not a
grid (e.g., I can only have the joint probability for odo of 0.26 and
bill of 0.30, can't have the joint probability for odo of 0.26 and
bill of 0.56?) how can I produce a surface graph version of Train's
graph on page 65 of http://elsa.berkeley.edu/~train/EMtrain.pdf?

It would be really appreciated if I could have your advice on this.


Best Regards,
Lulu

On Fri, Nov 1, 2013 at 2:42 PM, David Hoaglin <[email protected]> wrote:
> Dear Lulu,
>
> The additional explanation is helpful.  Thank you.
>
> The joint probability is already given by share.  That is, share is
> the (empirical) probability of the particular combination of odo and
> bill.  I see no justification for multiplying that column vector by
> its transpose.
>
> David Hoaglin
>
> On Thu, Oct 31, 2013 at 8:25 PM, Lulu Zeng <[email protected]> wrote:
>> Dear David and others,
>>
>> Thank you for responding to my question.
>>
>> "odo" and "bill" are 2 random coefficients I obtained from a fixed
>> mass points nonparametric choice model, "share" is the proportion of
>> observations at each point of "odo" and "bill", therefore gives the
>> probability of "odo" and "bill" at each point. Share is the same for
>> odo and bill, example as below (my actual model has 1,000 points).
>>
>> odo     bill      share
>> 0.26    0.30    0.34
>> 0.89    0.56    0.25
>> 0.41    0.73    0.41
>>
>> To work out the joint probability (call it "jp") of odo and bill at
>> each point, I multiply the colum vector "share" with its transposed
>> row vector as shown in table below (jp is the centre part of the matrx
>> below):
>>
>>                                          bill share
>>
>>                                     0.34    0.25     0.41
>>
>>                       0.34       0.12    0.09     0.14
>> odo share      0.25       0.09    0.06     0.10
>>                       0.41       0.14    0.10     0.17
>>
>> For the surface graph, I want odo on x axis, bill on y axis, and jp on
>> z. I thought the graph may be bell sharped as jp is symetric.
>>
>> In my previous email, I wasn't sure how to put jp in the graph as
>> -surface- needs 3 variables while my jp is a matrix.
>>
>> I just figured out a potential way to solve the problem but I haven't
>> got the chance to try it so still unsure whether it will work. My
>> approach is to reshape the data -- stack all 3 colums of jp into 1
>> colum and match odo, bill, and jp as one to one relationships. Example
>> below:
>>
>> odo      bill        jp
>> 0.26    0.30    0.12
>> 0.89    0.30    0.09
>> 0.41    0.30    0.14
>> ...................................
>> 0.26    0.56    0.09
>> 0.89    0.56    0.06
>> 0.41    0.56    0.10
>> ...................................
>> 0.26    0.73    0.14
>> 0.89    0.73    0.10
>> 0.41    0.73    0.17
>>
>> Then I will do: surface odo bill jp
>>
>> Thank you again David, please let me know if you can see any problem
>> in my approach, any alternative approach greatly appreciated.
>>
>> Best Regards,
>> Lulu
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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