robustvcv matlab function error message
显示 更早的评论
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 个评论
Alessandra Costa
2019-6-21
Geoff Hayes
2019-6-21
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
2019-6-24
Alessandra Costa
2019-6-24
Geoff Hayes
2019-6-24
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
2019-6-24
Alessandra Costa
2019-6-25
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Descriptive Statistics 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!