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: How to apply sktest to panel data?


From   LI Mengjia <[email protected]>
To   <[email protected]>
Subject   Re: st: How to apply sktest to panel data?
Date   Mon, 8 Apr 2013 23:33:25 +0800

I'm sorry I tried to attach the dta file here but the email is bounded. How should I give you the data to make my point clearer?

Dear Nick,

Thank you very much for your reply. The attachment is my data. I'm sorry for not offering it in the previous email. This is the first time I contact with statalist.

The "doesn't work" appeared to be like this (perhaps this is the problem withe format in this column):
. sktest Return if Fund == 000011.OF
variable OF not found

The major reason I want to do these tests is to explore whether female- or male-managed funds have a (more significant) positive skewness, which is actually preferred by investors. And similar reason to test kurtosis. I wish to test for individual fund is because I also want to have the proportion of funds managed by different genders that may have positive skewness.

The return data is collected weekly while the other data I have is on a half-year base from 2005 to 2010. Since the time length is quite limited, I wish to see the results on each time spot as well as the whole period.

I don't quite understand the 3rd point you mentioned. For the 4th one, I might also achieve the daily return that will generate a larger sample.

I just started this and I will take into consideration seriously.

Thank you again and regards,
Amy
在 2013-4-8,下午10:22,Nick Cox <[email protected]> 写道:

> There is no problem in principle about specifying -if- with -sktest-.
> Here is a dopey example:
>
> . sysuse auto , clear
> (1978 Automobile Data)
>
> . sktest mpg if foreign
>
>                    Skewness/Kurtosis tests for Normality
>                                                         ------- joint ------
>    Variable |    Obs   Pr(Skewness)   Pr(Kurtosis)  adj chi2(2)    Prob>chi2
> -------------+---------------------------------------------------------------
>         mpg |     22       0.143          0.477         2.98         0.2250
>
> You don't give your code or explain what "doesn't work" means,
> contrary to request, so I can only guess that you made some syntax
> error.
>
> A bigger question is what are you going to do with the results and why
> they are of interest.
>
> 1. Suppose some panels fall one side and other panels fall the other
> side of your chosen threshold significance level? What then?
>
> 2. -sktest- tacitly assumes independence of observations. If this is
> not valid for an -xt- problem, P-values are suspect, so decisions
> based on them are shaky.
>
> 3. Normality (Gaussianity) of the marginal distribution of the
> response is not a requirement for much. In practice, marked skewness
> for example might on various grounds fit better with (e.g.) fitting on
> a log scale, but that's a rather different story. (As you have returns
> as your response, that is unlikely to be possible.)
>
> 4. 26 is a rather small sample size to estimate skewness and kurtosis.
>
> The short answer to your question is "use a loop" and the mechanics of
> what you are seeking are covered are an FAQ
>
> FAQ     . . . . . . . . . . Making foreach go through all values of a variable
>        . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
>        8/05    Is there a way to tell Stata to try all values of a
>                particular variable in a foreach statement without
>                specifying them?
>
> http://www.stata.com/support/faqs/data-management/try-all-values-with-foreach/
>
> Nick
> [email protected]
>
> On 8 April 2013 15:06, LI Mengjia <[email protected]> wrote:
>
>> I want to run skewness and kurtosis normality test on my panel data in the following way:
>>
>> (1)For each Fund, and for each Year, use the Return from Week1 to Week26 to run the sktest and also get the value of skewness and kurtosis.
>>
>> (2)For each Fund, use all its Return to run the sktest and also get the value of skewness and kurtosis.
>>
>> The 1st column is Fund, in which each cell is the code of one fund. The 2nd column is Year, from 2005-2010. The 3rd column is Week, from Week1-Week26. The last column is Return.
>>
>> I tried "if" to restrain the sktest to each fund code but it didn't work. And I have 299 funds that I wish to finish the tests in one go instead of running each fund for 299 times.
> *
> *   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/
>

       ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
        Disclaimer:

This message (including any attachments) contains confidential information intended for a specific individual and purpose. If you are not the intended recipient, you should delete this message and notify the sender and the University immediately. Any disclosure, copying, or distribution of this message, or the taking of any action based on it, is strictly prohibited and may be unlawful.

The University specifically denies any responsibility for the accuracy or quality of information obtained through University E-mail Facilities. Any views and opinions expressed are only those of the author(s) and do not necessarily represent those of the University and the University accepts no liability whatsoever for any losses or damages incurred or caused to any party as a result of the use of such information.


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