Hi,

I want to run the Lasso with gretl's recent regls addon as a helper function for another algorithm, not as a main application. Also, it's inside a matrix-based specialized function, so I can't use the official regls() function which AFAIK only works with series and lists, not with matrices. (So I would request the feature that the standard regls() function accept matrix input; perhaps this issue came up before.)

So I've tried to use the "hidden" internal function _regls() (note the underscore) that I found in the hansl code of regls. In the addon's code, it seems to take two matrices and a bundle as input. The following attempt to imitate this failed, however:

<hansl>

include regls.gfn

matrix X = mnormal(200,5)
matrix Y = mnormal(200)

bundle reglsret = _(xvalidate=FALSE, estimator="LASSO", lfrac=0.2, stdize=FALSE)
err =  _regls(X, Y, reglsret) # use internal function for matrix stuff

</hansl>

I get an error message "datatypes not conformable".

Can such an approach be made to work?

thanks

sven
_______________________________________________
Gretl-devel mailing list -- gretl-devel@gretlml.univpm.it
To unsubscribe send an email to gretl-devel-le...@gretlml.univpm.it
Website: 
https://gretlml.univpm.it/postorius/lists/gretl-devel.gretlml.univpm.it/

Reply via email to