On Sun, 7 Dec 2008, Yuniarto Hadiwibowo wrote:
I'd like to know how to solve this ECM equation in Gretl:
dy = b[1] + b[2] dx + b[3] ( y(-1) - b[5] x(-1) )
With b[4]=b[3]*b[5],
dy = b[1] + b[2] dx + b[3] y(-1) - b[4] x(-1)
Using OLS we can have coefficient, t-value, and p-value of:
b[1], b[2], b[3], and b[4]
<script>
open data10-5
ols diff(calwage) const diff(uswage) lags(1,calwage) lags(1,uswage)
</script>
How to get coefficient, t-value, and p-value of b[5] itself?
It's a nonlinear model; you can use nls.
<script>
open data10-5
diff calwage uswage
lags 1 ; calwage uswage
ols d_calwage const d_uswage calwage_1 uswage_1
scalar b1 = $coeff(const)
scalar b2 = $coeff(d_uswage)
scalar b3 = $coeff(calwage_1)
scalar b5 = 1
nls d_calwage = b1 + b2*d_uswage + b3*(calwage_1 - b5*uswage_1)
deriv b1 = 1
deriv b2 = d_uswage
deriv b3 = calwage_1 - b5*uswage_1
deriv b5 = -b3*uswage_1
end nls
</script>
Allin Cottrell