Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Barber style Johnson ttest of regression constant

From   "Gordon Gecko" <>
Subject   st: Barber style Johnson ttest of regression constant
Date   Sun, 25 Sep 2005 13:08:27 +0200 (MEST)

Dear Statalisters,

I need to calculate a skewness adjusted t statistic of a "xtreg,fe"
regression constant. The regression has multiple (3) independent variables.
This is necessary to test the significance of abnormal returns in a
long-term event study.

My question is similar to the following Statalist question:

The adjusted t-statistic is given in "Barber et al. 1999"

The statistic can be found on page 16 in the following paper: 

The Stata code for a simple variable x with i observations would be:

**** One Sample johnson t-test as in Barber et al. 1999 ****

summarize Xi

gen mean = r(mean)

gen stddev = r(Var)^0.5

gen numobs = r(N)

gen S = (mean/stddev)

gen cubes = (Xi-mean)^3

egen sumcubes = sum(cubes)

gen jskew =sumcubes/(numobs*(stddev^3))

* johnson t-test as in Barber et al. 1999 *

gen jttest = ((numobs^0.5) *(S+1/3*jskew*S^2+(1/(6*numobs))*jskew))


Does anybody have an idea how to implement this for a "xtreg, fe" regression
constant. (I do not want to use the program "johnson" - does not work for
this problem I believe)

In particular: how do I calculate the cubes variable:

 "gen cubes = (Xi-mean)^3" 

if mean is the regression constant
and the regression includes multiple (3) independent variables.

Thank you very much for having a look at this. 
I believe an answer would be very helpful for many newbie economists trying
to implement a long-term event study.

Kind Regards,

Sebastian Körömi

5 GB Mailbox, 50 FreeSMS
+++ GMX - die erste Adresse für Mail, Message, More +++
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index