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

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

From |
Arne Risa Hole <arnehole@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: estimation of SE of correlation after mixlogit |

Date |
Fri, 12 Aug 2011 12:26:56 +0100 |

Nick Note that -mixlogit- is a user-written command which is available from the SSC and described in <http://www.stata-journal.com/article.html?article=st0133>. Running the following command after -mixlogit- (on one line) will give you the SE of the correlation: nlcom (rho: [l21]_b[_cons]*[l11]_b[_cons] / sqrt([l11]_b[_cons]*[l11]_b[_cons]*([l21]_b[_cons]*[l21]_b[_cons] + [l22]_b[_cons]*[l22]_b[_cons]))) Arne On 12 August 2011 10:59, Nick Darson <nick.darson@googlemail.com> wrote: > Hi listers, > > After running mixlogit, I am wondering how I exactly calculate the > standard error of the correlation. > > To my understanding, I have to do this manually after obtaining the > covariance-variance components using the command "mixlcov" (please > tell me if there is an easier automatic way that I have overlooked, > such as using nlcom - I have tried this but always get error > messages). > > For example, I have a multinomial model with three possible > alternatives: low, mid, high (low as the base case; mid and high are > random and allowed to be correlated). > > Hence, after estimation with mixlogit and using "mixlcov", I obtain > the values for v21, v11, and v22. > > This way I can easily calculate the correlation of the two variables: > rho= _b[v21] / sqrt (_b[v11] * _b[v22]) > > However, how do I calculate the SE of this correlation? > I found the following formula: SE(rho) = sqrt ( 1-rho^2 / n -2 ) > > However, which value do I use for "n"? In my case, I have repeated > measures (each of the 200 individuals makes 5 choices). Hence, should > I use n=200 (the number of subjects), n= 1000 (total number of > observations), or do I need to look how many cases actually have > chosen mid and high (e.g. let's say from the 1000 total choices, 200 > are mid and 300 are high, hence n=500)? > > Thankful for any help on this apparently simple issue. > > Cheers, > Nick > * > * 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/

**Follow-Ups**:**Re: st: estimation of SE of correlation after mixlogit***From:*Nick Darson <nick.darson@googlemail.com>

**References**:**st: estimation of SE of correlation after mixlogit***From:*Nick Darson <nick.darson@googlemail.com>

- Prev by Date:
**Re: st: How to return a Mata matrix in Stata** - Next by Date:
**Re: st: estimation of SE of correlation after mixlogit** - Previous by thread:
**st: estimation of SE of correlation after mixlogit** - Next by thread:
**Re: st: estimation of SE of correlation after mixlogit** - Index(es):