On Sun, 20 Nov 2016, cociuba mihai wrote:
There is an error with Gretl when I try to replicate the example from
the
Gretl User's Guide (pg 334) :
######SCRIPT OUTPUT############
gretl version 2016d-git
Current session: 2016-11-20 18:07
? clear
? function matrix stata_reorder (matrix se)
> # stata puts the intercept last, but gretl puts it first
> scalar n = rows(se)
> return se[n] | se[1:n-1]
> end function
? open data4-1
Read datafile /usr/local/share/gretl/data/data4-1.gdt
periodicity: 1, maxobs: 14
observations range: 1 to 14
Listing 5 variables:
0) const 1) price 2) sqft 3) bedrms 4) baths
? ols 1 0 2 3 --cluster=bedrms --quiet
? matrix se = $stderr
Generated matrix se
? foreign language=stata --send-data
? regress price sqft bedrms, vce(cluster bedrms)
? matrix vcv = e(V)
? gretl_export vcv "vcv.mat"
? end foreign
? matrix stata_vcv = mread("vcv.mat", 1)
*/home/acer/.gretl/vcv.mat: No such file or directory*
OK, apparently the gretl_export function that we feed to Stata is
not working in all cases. I'm not sure why, but anyway I've now
added in git an explicit "cd" to the user's dot directory in the
Stata code. Hopefully this should ensure that the matrix file is
written to the right place.
Allin