evaluating condition in a model
Posted: Sun May 06, 2018 8:58 am
I have the following problem: I want to specify a variable according to a condition
I want Eviews to assign the value zero to ETA when the denominator of the resulting ratio would be zero, and compute a ratio otherwise.
The problem is that when DCD assumes a zero value, Eviews returns an error message when solving the model (unable to compute due to missing data)
How can this be specified?
Thank you!
Code: Select all
test.append eta = (dcd=0)*0+(dcd<>0)*(2/dcd)
test.append dcd = cd-cd(-1)
I want Eviews to assign the value zero to ETA when the denominator of the resulting ratio would be zero, and compute a ratio otherwise.
The problem is that when DCD assumes a zero value, Eviews returns an error message when solving the model (unable to compute due to missing data)
How can this be specified?
Thank you!