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]
st: Which test are applicable for dummy independant variables
From
Max Tymoszuk <[email protected]>
To
[email protected]
Subject
st: Which test are applicable for dummy independant variables
Date
Tue, 11 Feb 2014 11:02:14 +0100
Hey Guys,
I am writting my thesis at the moment and I face some difficulties
with STATA or the econometrical/statistical analysis. I am a complete
STATA rookie and this code is the best that I could produce ;)
I constructed a regression where the dependent variable is annual
stock return and the independent variables are all dummy variables
with (1 and 0).
I try to test for heteroskedasticity, autocorrelation,
multicollinearity and omitted variables. The sample consists of 961
observations.
However I am not quite sure if my approach is correct.
1) To test for heteroskedasticity, I use:
- Corrgram
- Varsoc
- Estat bgodfrey
= Does it make sense to use all of those tests or can I just
concentrate on one? Which one?
= Can I use these tests although I only have dummy independent variables?
= I am not quite sure about the lag. I used varsoc and corrgram to
indicate which lag to choose. But I have no autocorrelation in the
sample. For the sake of completeness I tested the following lags:
- Corrgram RETURN, lags(25)
- Varsoc RETURN, maxlag(25)
- Varsoc RETURN, maxlag(12)
- Varsoc RETURN, maxlag(6)
- estat bgodfrey, lag(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
20 21 22 23 24 25)
- estat bgodfrey, lag(1 2 3 4 5 6 7 8 9 10 11 12)
- estat bgodfrey, lag(1 2 3 4 5 6)
Shall I keep using all of those or is it unnecessary as lag 25 already
tests for lag 6 (if it's the case) etc.?
2) In general, I use the following tests:
a. Autocorrelation (see above)
b. Hettest
c. As I have heteroskedasticity, I use the "robust" regression
(Huber-White standard errors)
d. Vif
e. Ovtest
= Can I use these tests although I just have dummy independent
variables and my dependent variable is continuous?
Thanks sooooo much for your help!!!!
Max
For the sake of completeness, the whole code:
**Import File
import excel "\\...........FinalSample.xlsx", sheet("Total") firstrow
**Sort by Date
sort Date Obs
**Create Dummy Variables
tabulate Payment, gen(Payment)
tabulate Status, gen(Status)
tabulate Country, gen(Country)
tabulate Industry, gen(Industry)
tabulate Listing, gen(Listing)
tabulate MB, gen(MB)
**Prepare Timeseries for Autocorrelation Check
****I have overlapping time data so I created a new time variable
gen time = _n
tsset time
**Plot BHAR over time to show no trend over time (Serial
Correlation/Autocorrelation)
twoway (tsline RETURN, recast(scatter))
**Regression MB2 MB3
regress RETURN Payment1 Status1 Country1 Industry1 Listing1 MB2 MB3
**Autocorrelation Check
corrgram RETURN, lags(25)
varsoc RETURN, maxlag(25)
varsoc RETURN, maxlag(12)
varsoc RETURN, maxlag(6)
estat bgodfrey, lag(1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
21 22 23 24 25)
estat bgodfrey, lag(1 2 3 4 5 6 7 8 9 10 11 12)
estat bgodfrey, lag(1 2 3 4 5 6)
**Heteroskedasticity
hettest Payment1 Status1 Country1 Industry1 Listing1 MB2 MB3
**Regression with Huber-White standard errors
regress RETURN Payment1 Status1 Country1 Industry1 Listing1 MB2 MB3, robust
**Check for Multicollinearity. VIF-Test
vif
**Check for Omitted Variables. OVTest
ovtest
**Regression MB1 MB3
regress RETURN Payment1 Status1 Country1 Industry1 Listing1 MB1 MB3
**Heteroskedasticity
hettest Payment1 Status1 Country1 Industry1 Listing1 MB1 MB3
**Regression with Huber-White standard errors with MB1 & MB3
regress RETURN Payment1 Status1 Country1 Industry1 Listing1 MB1 MB3, robust
**Check for Multicollinearity. VIF-Test
vif
**Check for Omitted Variables. OVTest
ovtest
** Summary Stat
estat summarize
*
* 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/