Computing the standard errors
显示 更早的评论
Dear all,
for my master's thesis, I have to compute the standard errors of the estimated model parameters using a bootstrap approach. Trying to run the file "booti2.m", I obtain the following error:
>> booti2
Index exceeds the number of array elements. Index must not exceed 19.
Error in llfn (line 61)
sigvtr = bigthet(20);
^^^^^^^^^^^
Error in
fminunc (line 233)
f = feval(funfcn{3},x,varargin{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in
booti2 (line 87)
[thetstar,fstar,exitflag] = fminunc(@llfn,bigtheto,options);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Caused by:
Failure in initial objective function evaluation. FMINUNC cannot continue.
>>
Please note, that before I could run the original "booti.m" file with data for France successfully, while now I can't run neither Slovenian nor French file. Thank you so much! Meancimpr.DAT file is in the folder Searching for Starting Values - Full Sample
5 个评论
Svit
2026-5-17,14:27
Torsten
2026-5-17,14:34
Then use a .zip file in which you include all necessary files.
Svit
2026-5-17,14:45
There are two files named "llfn.m" in the .zip file, one in the folder "Searching for Starting Values - Full Sample", the other in the folder "Computing Bootstrapped Standard Errors - Full Sample".
In one of them, there is a line
sigvtr = bigthet(20);
in the other, this line is missing.
From the error message it is obvious that "llfn" is called with an array "bigthet" with only 19 instead of the necessary 20 elements. So the llfn-version with an expected length of 20 for "bigthet" cannot be used (or bigthet has to be modified before the call to llfn).
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Data Import and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!