Help generating bootstrap standard errors for parameters generated from fminunc?
3 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spline Construction 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!