Bookmark and Share

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]

Re: st: iccvar


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: iccvar
Date   Thu, 13 Dec 2012 11:47:36 +0000

If you want a plain correlation, it is given by -correlate-. That
would have no relation to -xtmixed-. You could calculate it for the
panels lumped together, or for panels separately. What makes sense
would depend on your scientific goals. If that isn't what you want,
you will need to be much more specific.

Nick

On Thu, Dec 13, 2012 at 11:35 AM, megan rossi <megan_rossi@msn.com> wrote:

> Thanks, however I am after the correlation coefficient from panel data, not the ICC.In other words I am looking for a command to use following xtmixed that will give me the the correlation coefficient for my dependent and independent variable. Any ideas?

dirk.enzmann@uni-hamburg.de

>> It seems that -quickicc- (from SSC) does *not* calculate the ICC of
>> random slope models. But you can use -xtmrho- (from SSC), instead -
>> although -xtmrho- does not calculate the standard error.
>>
>> Stata example (runable from do-file window):
>>
>> * --------------------------------------------
>> cap which quickicc
>> if _rc ssc install quickicc
>>
>> cap which xtmrho
>> if _rc ssc install xtmrho
>>
>> webuse nlswork
>> xtmixed ln_wage grade age c.age#c.age ttl_exp ///
>> tenure c.tenure#c.tenure || idcode: tenure
>> xtmrho
>> quickicc
>> * --------------------------------------------
>>
>> BTW: Note that in the first "official" example for -xtmixed- (see -h
>> xtmixed-) the variables ln_wage and idcode are abbreviated to ln_w and
>> id which - depending on your varabbrev setting (see -h set_varabbrev-)
>> might give you an error message if you try to run it (this should be
>> corrected!).
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index