Statalist The Stata Listserver

[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: panel data regression question (Stata and statisticalquestion)

From   "Paul Mcgeoghan" <>
To   <>
Subject   st: panel data regression question (Stata and statisticalquestion)
Date   Wed, 21 Mar 2007 18:47:16 +0000


I am new to Stata as I largely use SPSS.

I will explain my problem:
I have 2 years of data to do with the number of disclosure items (TOTALITEM) a company discloses on
its own website and the number of items that are disclosed on the government website for that

I have a number of explanatory variables, 2 of which are dummy variables like Industry (Computing
or Non-Computing) and Location (UK or not). Also, proportion of foreign shareholders (PROPFOR) which
does not vary over the 2 years.
I have some continuous explanatory variables which do vary over the 2 years, ie LOGSIZE (company's
size), EQUITY.

Using Stata, I have been looking at Fixed, Between and Random Effects models using Panel Data.

I have gone to Statistics Time Series Setup and Utilities and declared dataset to be time series
and the time is YEAR (2005 and 2006) and Panel ID is Subject so my data looks like:

Subject  YEAR     TOTALITEM Industry LOGSIZE
1            2005      20                  1           18
1            2006      30                  1           20
2            2005      50                  0           25
2            2006      60                  0           30

So to choose between Fixed effects or Random effects, I type the command:

1) xtreg totalitem propfor industry location logsize,fe
2) estimates store fixed
3) xtreg totalitem propfor industry location logsize,re
4)  estimates store random
5)  hausman fixed random

1) the fixed effects model in the output shows the coefficients for the independent variables which
vary across time, ie LOGSIZE and PROPFOR but those that do not vary are dropped.
2) the random effects model shows coefficients for all independent variables in the model.
3) hausman indicates no insignificant p-value
Therefore, this indicates I should use fixed effects model instead of random. My question is how do
I now specify a fixed effects model in Stata which shows me all the coefficients of all independent
variables as running the command 
xtreg totalitem propfor industry location logsize,fe
will drop those that do not vary over 2 years.

Sorry, but I am only a beginner in Stata.


Paul McGeoghan,
Application support specialist (Statistics and Databases),
University Infrastructure Group (UIG),
Information Services,
Cardiff University.
Tel. 02920 (875035).
*   For searches and help try:

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