robustvcv matlab function error message
Show older comments
Good morning to everyone, I had an error when I try to estimate a robust variance covariance matrix, using robustvcv. In particular, I want to evaluate the variance covariance matrix of a matrix of data (a matrix with 4683 x 20 observations), using the prameters estimated from fmincon.
I use the following syntax:
[vcv]=robustvcv('f', pars, 0, data), where data is the original matrix of input data of the f function, 'f' is a functiont that returns, as first output a scalar(sum of loglikelihood) and a second input a vector Tx1 of loglikelihood values, as required by function robustvcv. 0 is the usual value that refers to the lag.
pars is a 1x82 vector of parameters estimated from fmin* ,but I get the following error message:
Index in position 1 exceeds array bounds (must not exceed 1).
Could someone tell me what could cause the error message?
I use the same function robustvcv on a vector 1x4 parameters, but using a vector Tx1 of observations, and it gives me the right answer, without error.
7 Comments
Alessandra Costa
on 21 Jun 2019
Geoff Hayes
on 21 Jun 2019
Alessandra - where did you get the robustvcv function? Is it included in a MATLAB toolbox or is this third party code or something that you have written?
Alessandra Costa
on 24 Jun 2019
Alessandra Costa
on 24 Jun 2019
Geoff Hayes
on 24 Jun 2019
Alessandra - please copy and paste the full error message to this question so that we can get an idea of which line is throwing the error. You may also want to include your f function (just attach it).
Alessandra Costa
on 24 Jun 2019
Alessandra Costa
on 25 Jun 2019
Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!