Page 1 of 1

Refuses to Estimate Dummy Variable

Posted: Sun Mar 16, 2014 5:24 am
by econstudent
I had no problem estimating my equation before the dummy, but now I've added the binary intercept dummy it's refusing to estimate saying "log of non-positive number" error.

What I would like to estimate is this:
log(y) = log(c(1)) + c(2)*log(k) + c(3)*log(l) + c(4)*log(e) + c(5)*log(m) + dummy*log(c(6))

I have tried many different variants but it refuses to estimate it.

I'm using Eviews 7.

It had no problem estimating the original equation which was:

log(y) = log(c(1)) + c(2)*log(k) + c(3)*log(l) + c(4)*log(e) + c(5)*log(m)

and my dummy variable seem to be fine.

Any ideas on how to make it work? I've tried adding extra brackets but the error still comes up

Re: Refuses to Estimate Dummy Variable

Posted: Sun Mar 16, 2014 5:56 am
by trubador
As the error message clearly states that you are trying to take the logarithm of a non-positive number, which is either zero or negative. Since the problematic term appears to be dummy*log(c(6)) and the only logarithmic operation performed is the one on the coefficient (not on the variable dummy), then you can infer that logarithm of c(6) is the source of problem. You'll soon discover that coefficient vector, c, in the workfile, is filled with zeros by default and is updated after each estimation.

Re: Refuses to Estimate Dummy Variable

Posted: Sun Mar 16, 2014 7:35 am
by econstudent
The coefficient, c, is full of negative numbers and zeros.

It estimated this without a problem:
LOG(Y) = LOG(C(1)) + C(2)*LOG(K) + C(3)*LOG(L) + C(4)*LOG(E) + C(5)*LOG(M) + C(6)*DUMMY

but that isn't what I'm looking for, as I want to estimate the effect of the intercept dummy.

Re: Refuses to Estimate Dummy Variable

Posted: Sun Mar 16, 2014 8:18 am
by startz
The coefficient, c, is full of negative numbers and zeros.

It estimated this without a problem:
LOG(Y) = LOG(C(1)) + C(2)*LOG(K) + C(3)*LOG(L) + C(4)*LOG(E) + C(5)*LOG(M) + C(6)*DUMMY

but that isn't what I'm looking for, as I want to estimate the effect of the intercept dummy.
C(6) gives the effect of the intercept dummy.

Trubador pointed out that in your previous equation you had log(c(6)), which isn't defined for values c(6)<=0.