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!