On Mon, 10 Aug 2009, Zhenzeng Young wrote: > I tried to estimate panel data simultaneous equation model, but > failed as an error message appeared, it says "Sorry, command not > available for this estimator". > > I attached my dataset to this mail, and the information about > the dataset and equations is...
Thanks for the test case. This was very helpful -- it exposed a few bugs that are now fixed in CVS and the Windows snapshot at http://ricardo.ecn.wfu.edu/pub/gretl/gretl_install.exe This response is rather lengthy. but hopefully it may be helpful to you and to others who may have run into similar problems. First, the error message you got -- "Sorry, command not available for this estimator" -- was wrong and misleading. The message should have been, "Missing data encountered". (I had forgotten that gretl rejects missing values when doing system estimation; that's not a bug in itself, but the error-reporting was messed up.) We then want to limit the sample to non-missing observations to do the system estimation. My script to handle this began as follows: <script> open fin_dev_v1.csv # register the panel structure setobs 26 1.1 --stacked-time-series list sysvars = pf gdpr ko pcr gdpc efw to fdi smpl sysvars --no-missing </script> The idea was to make a list of all the variables used in the system equations, then sample with the "--no-missing" option to cut out the rows with missing values for variables in the list. This exposed two further issues. First, the word "to" is used by gretl in constructing ranges of lags. So my command to set up the list "sysvars" went wrong -- it was confused by your variable named "to". My fix for issue this was to make "to" a reserved word (that is, you are no longer allowed to call a variable "to"). OK, so I renamed "to" to "xto" in your CSV file and tried again. Next problem: after doing smpl sysvars --no-missing there was still a problem with missing values. How could that be? The trouble was that after sub-sampling, gretl was "helpfully" trying to reconstitute a balanced panel by inserting some padding rows. In most cases this is in fact helpful, but when the "--no-missing" option is given with "smpl" it is clearly not right. That is now fixed. With the various fixes in place, the following will do system estimation on your data: <script> open fin_dev_v1.csv --quiet setobs 26 1.1 --stacked-time-series # in case we want to keep track of panel structure genr unit genr time list sysvars = pf gdpr ko pcr gdpc efw xto fdi smpl sysvars --no-missing pansys <- system equation pf 0 gdpr ko pcr equation pcr 0 gdpc efw xto pf fdi endog pf pcr end system estimate pansys method=ols estimate pansys method=tsls estimate pansys method=3sls </script> Allin Cottrell