Is 'ols' function in Econometrics toolbox in MATLAB? - matlab

I am trying to run a code which calls the function OLS. reg=ols(y,X). I am getting an error saying that ols is an undefined function for input of type double. Is ols a function in the econometrics toolbox or do we create a separate ols function? I have checked the working directory and the toolbox is added to the path. I don't know what the problem is.

I don't have ols either and I have the econometrics toolbox. I'm guessing you are looking for some functions in File Exchange, most likely the Toolkit on Econometrics and Economics Teaching.

Related

Simbiology toolbox and fmincon in MATLAB

Is is possible to use the model simulated in the Simbiology toolbox of Matlab
to be used to implement fmincon for the same by calling the model from Simbiology?
It is possible to simulate the SimBiology model from a MATLAB script or the command line (see sbiosimulate). This allows the simulation results to be used by any other MATLAB function as needed. I assume that in your case you want to use the simulation results to construct an objective function to use with fmincon and it is possible. Let me know if you need more details.
The short answer is probably, yes. If you have access to the tools and try this, let me know and we can help further.

call a MATLAB function in GAMS

Is it possible to use a function
of MATLAB in GAMS code.
I have a matrix in my GAMS cod , and I need to have inverse and determinant of matrix , is it possible to call a Determinant function of Matlab in GAMS ? If it's possible How?
Calling GAMS with MATLAB is made possible with the data exchange tools between GAMS and MATLAB called GDXMRW. You can learn more about the process of Data Transfer from the link below.
https://www.gams.com/latest/docs/T_GDXMRW.html

Matlab, an error after using fitctree function

I am trying to construct a decision tree. I tried using the fitctree function and wrote:
ctree = fitctree(TrainingX,TrainingY);
such that TrainingX is the input matrix and TrainingY is the target matrix. An error appears saying that:
Undefined function 'fitctree' for input arguments of type 'double'.
I don't know what is the problem and what should I do to solve it. Could you please help me?
The reason why it is undefined is because fitctree requires the Statistics Toolbox in MATLAB. If you don't have the Statistics Toolbox, you can't use this function and you're SOL. Sorry!
Even with the Statistics Toolbox, fitctree is only available for recent editions of MATLAB (R2014a+). Check the release notes on the Statistics Toolbox for more details: http://www.mathworks.com/help/stats/release-notes.html. Go to where R2014a is and fully expand out all of the facts by clicking on Expand All. Where you see "Functions for classification methods and clustering", you'll see an entry for fitctree there.
The only option would be to upgrade your version of MATLAB to at least R2014a or above.
Good luck!

Can a Matlab function be used in a CUDA kernel?

The lsqcurvefit Matlab function is used to fit the paramaters of a model curve to a real curve (acquired data from experiment or observation) so that de square differences are minimized. lsqcurvefit
The function is time consuming, and maybe prohibitive if used on large set of curves.
Can it be straightforwardly used inside a CUDA kernel, being then all the program coded in Matlab? (Edit: this is, without writing a custom version of lsqcurvefit in C for the kernel. For instance: write the kernel code in Matlab (using there "any" matlab function like lsqcurvefit()), then compile the kernel with a Matlab provided tool, and finally execute the kernel in the GPU, called from matlab host code).
Thanks
There are many ways to combine the capabilities of matlab with GPUs, but there isn't any matlab code that can be used in a CUDA kernel.

Simulate ARMA process in matlab

I am trying to simulate a time series process using Matlab. For example, let's see the following example:
http://www.mathworks.com/help/econ/arima.print.html
When I run following code
model = arima(1,0,1);
[fit,VarCov] = estimate(model,Y,'print',false);
I get the following error:
??? Undefined function or method 'arima' for input arguments of type 'double'.
Does Matlab contain functions for Matlab? Can I calculate different functions,like calculate autocorrelation or autocovariance at different lag? Or estimate ARMA parameters?
You need to make sure that you have a license and code for the Econometrics Toolbox before using that function. MATLAB has annoying license requirements for both the main software and its various toolboxes :(
But, you may be able to find some public code that can do the same thing. Check out http://www.mathtools.net/