Thanks Luca for submitting the plugin. I have increased the upload size allowed to 1MB for .zip files and attached the plugin zip file to this post. I Also attached is a sample model file that uses this new plugin.
Simple download the .zip unzip to your Quantrix Installation directory to use the function Luca created.
I had the same need, and decided to integrate in Quantrix an open source statistical library by Michael Flanagan (see [url:24shjf88]http://www.ee.ucl.ac.uk/~mflanaga/java[/url:24shjf88]).
I tried to emulate array functions, i.e. functions that take 2-dim matrices or submatrices as arguments, pass those matrices as args to functions in a statistical external library, and return 2-dim submatrices as results. In order to accomplish that, I create a buffer in memory and fill it with the result matrix at recalculation, so that cells referenced in the result expression can auto-fill themselves given the indexes (coordinates) of each cell. This approach is similar to the one used in Quantrix marketdata sample plugin. Since the recalc procedure in Quantrix is single-cell driven, I pass the item counter for row and column categories (#categoryname) as an argument to the function, in order to assign the correct result from the buffer matrix to each cell (I could not find a way to avoid such arg passing).
I would like to share a simple QAPI function doing multiple regression.
I ask Mike Salisbury wether and how can I send the Java plugin together with the binary version of Flanagan’s library (I cannot upload it myself, it exceeds file size limits). I could also send an accompanying example model for better intuition of my test.
It’s just a first attempt: it takes an input matrix with Y and XX values and returns regression coefficients and their standard errors in an output matrix. A stat library such as the one I used, and other that can be found or developed, can do much more that (various regression models with complete statistics, etc.).