Help generating bootstrap standard errors for parameters generated from fminunc?

8 ビュー (過去 30 日間)
jlr
jlr 2019 年 2 月 5 日
編集済み: jlr 2019 年 2 月 5 日
I am trying to generate standard errors using a bootstrap for parameters generated from fminunc. The issue is that the ojective function in fminunc must be scalar, but I have B different objective functions for each repetition of the bootstrap--in this case fun2b has the following dimentions (1,1,B). I think if I could pull each of the b elements from fun2bs, I could estimate this fine, but I don't see how to pull elements from a parameterized function.
Apologies if this is a stupid question, as I'm sure is clear from the code below, I am new to matlab.
My code is as follows:
for b=1:B
y(:,:,b)=datasample(wavemovs,100); **** create B copies of bootstrapped data dependent variable***
x(:,:,b)=datasample(x7ss,100); **** create B copies of bootstrapped data independent variables***
fun2bs=@(bs)probitboot(bs,y,x) **** function that generates the objective function which is **dependent on parameter vector bs and returns a 1*1*B matrix
fminunc(fun2bs,beta0,opts)
end

回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by