Estimating STVAR model
Posted: Wed Oct 16, 2024 4:39 am
Hi Eviews Experts,
I have tried to estimate the STVAR, using both the Maximum Likelihood Estimation and the NonLinear Least Squares (nls). I get an error message. Please see attached file.
Below is the system of equations that I have tried to estimate:
'================CREATING A SYSTEM OF EQUATIONS FOR A 2-variable STVAR(1)===========================================
system STVAR_{%c} 'The first line declares a system.
!c_start = 255 ' depends on what data you use.
!gamma_start = 1
param c(1) 0 c(2) 0.7 c(3) 0.1 c(4) !gamma_start c(5) !c_start c(6) 0 c(7) -0.3 c(8) -0.1 c(9) 0 c(10) 0.8 c(11) 0.2 c(12) -0.4 c(13) -0.2 c(14) -0.5
STVAR_{%c}.append CA_{%c} = c(1)+c(2)*CA_{%c}(-1)+c(3)*GDP_GROWTH_{%c}(-1)+(1-EXP( -c(4)*(CA_{%c}(-1)-c(5))^2))*(c(6)+c(7)*CA_{%c}(-1)+c(8)*GDP_GROWTH_{%c}(-1)) 'c(4) and c(5) are TRANSITION PARAMETERS
STVAR_{%c}.append GDP_GROWTH_{%c} = c(9)+c(10)*GDP_GROWTH_{%c}(-1)+c(11)*CA_{%c}(-1)+(1-EXP( -c(4)*(GDP_GROWTH_{%c}(-1)-c(5))^2))*(c(12)+c(13)*GDP_GROWTH_{%c}(-1)+c(14)*CA_{%c}(-1))
STVAR_{%c}.append CA_{%c}(-1) GDP_GROWTH_{%c}(-1) 'line appends the list of instruments to be used in estimation.
'STVAR.nls ' estimate the parameters of a model using nonlinear least squares.
STVAR_{%c}.ml(optmethod=Newton) ' estimate the parameters of a model using maximum likelihood estimation
'STVAR.estimate(method=nls)
show STVAR_{%c}.results 'display the estimation results.
Kindly assist,
Nwabisa Ndzama
I have tried to estimate the STVAR, using both the Maximum Likelihood Estimation and the NonLinear Least Squares (nls). I get an error message. Please see attached file.
Below is the system of equations that I have tried to estimate:
'================CREATING A SYSTEM OF EQUATIONS FOR A 2-variable STVAR(1)===========================================
system STVAR_{%c} 'The first line declares a system.
!c_start = 255 ' depends on what data you use.
!gamma_start = 1
param c(1) 0 c(2) 0.7 c(3) 0.1 c(4) !gamma_start c(5) !c_start c(6) 0 c(7) -0.3 c(8) -0.1 c(9) 0 c(10) 0.8 c(11) 0.2 c(12) -0.4 c(13) -0.2 c(14) -0.5
STVAR_{%c}.append CA_{%c} = c(1)+c(2)*CA_{%c}(-1)+c(3)*GDP_GROWTH_{%c}(-1)+(1-EXP( -c(4)*(CA_{%c}(-1)-c(5))^2))*(c(6)+c(7)*CA_{%c}(-1)+c(8)*GDP_GROWTH_{%c}(-1)) 'c(4) and c(5) are TRANSITION PARAMETERS
STVAR_{%c}.append GDP_GROWTH_{%c} = c(9)+c(10)*GDP_GROWTH_{%c}(-1)+c(11)*CA_{%c}(-1)+(1-EXP( -c(4)*(GDP_GROWTH_{%c}(-1)-c(5))^2))*(c(12)+c(13)*GDP_GROWTH_{%c}(-1)+c(14)*CA_{%c}(-1))
STVAR_{%c}.append CA_{%c}(-1) GDP_GROWTH_{%c}(-1) 'line appends the list of instruments to be used in estimation.
'STVAR.nls ' estimate the parameters of a model using nonlinear least squares.
STVAR_{%c}.ml(optmethod=Newton) ' estimate the parameters of a model using maximum likelihood estimation
'STVAR.estimate(method=nls)
show STVAR_{%c}.results 'display the estimation results.
Kindly assist,
Nwabisa Ndzama