On Fri, 9 Oct 2015, Sven Schreiber wrote:
Am 07.10.2015 um 16:45 schrieb Nathan Nyamapasi:
> Good day
>
> may you kindly assist by telling me how i can correct for
> heteroscedasticity when dealing with data that is composed of non
> positive values like zero and negative value. your urgent assistance is
> greatly appreciated in advance/
Nathan, that sounds very much like a question that is not gretl-related,
even when I abstract from the strange word "Eviews" in your subject.
This list is not intended for such questions. What I can tell you is
that gretl doesn't care if the numbers are positive or not (assuming
we're talking about the data and not of the variance measure).
Sven's point is well taken. However, the question may have been
motivated by the thought that "correcting for" heteroskedasticity
may somehow involve taking logs, which of course can't be done for
negative numbers.
For the record, then, let's point out that the two basic approaches
to heteroskedasticity in gretl -- namely, switching to "robust"
standard errors, or switching from OLS to GLS via the "hsk" command
-- do not require taking logs of negative numbers. The following
script illustrates. The series y and x contain both positive and
negative values, and the data-generating process is heteroskedastic
by construction.
<hansl>
nulldata 50
set seed 3711
series x = normal()
# generate heteroskedastic y
series y = -1 + 3*x + normal()*x
# verify we have negative values in both y and x
print y x --byobs
# run OLS
ols y 0 x
# try robust standard errors: no problem
ols y 0 x --robust
# try GLS: again, no problem
hsk y 0 x
</hansl>
In this case the "hsk" command produces a closer approximation to
the true x-slope of 3.0 (2.997, versus 3.098 from OLS), although
obviously one would have to replicate the example a large number of
times to verify that (as theory says) the hsk estimates are more
efficient, given heteroskedasticity.
What Eviews does, and whether it has a problem with negative x or y,
I don't know.
Allin Cottrell