cubic splines, fractional polynomials, and more
by Riccardo (Jack) Lucchetti
Hi all,
I'd just like to tell people that we have a new function package (by yours
truly) called "basis_functions", that can be used for easily incorporating
nonlinearity in your models; it also includes a handy function for
generating Fourier harmonics.
You can find it in the usual place:
http://gretl.sourceforge.net/cgi-bin/gretldata.cgi?opt=SHOW_FUNCS
Of course, comments are welcome.
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------
2 years, 5 months
foreign block: no printouts from R
by Sven Schreiber
Hi all,
I'm currently using the foreign block and specialized (user-defined) R
functions a bit more seriously. I'm noticing that the output from
print() calls inside the R functions does not seem to make it to the
outside. Consider the following minimal example:
<hansl>
set R_functions on
foreign language=R
Rfunc<-function(a){
print("hello from R") # doesn't get printed
out = 1000
}
end foreign
function void gretlfunc(void)
scalar z = R.Rfunc(1)
print z
end function
gretlfunc()
</hansl>
I'm seeing the result 1000 being printed from the gretl side, but not
the string "hello from R". Inside my gretl dotdir (on Windows) I have
the file Rsrc which contains the following line:
sink("C:/Users/<myuserid>/AppData/Roaming/gretl/R.out", type="output")
but I don't have this corresponding R.out file.
My theory is that this sink() thing only works when the R source itself
also contains the function call, but not when I use the very nice
feature and call the function from the gretl side. Right?
The use case for me right now is "only" to get debugging statements
printed out, but in general I guess an R function might also contain
some more important printouts.
thanks
sven
2 years, 5 months
Can gretl replicate STATA's reghdfe output?
by Fred Engst
More and more of my students are using STATA’s reghdfe for their model estimations. I wonder if it is possible to achieve the same results by gretl. If we can, how? If not, is there a work around to get the same results?
Thanks,
Fred
2 years, 5 months