필터 지우기
필터 지우기

Help generating bootstrap standard errors for parameters generated from fminunc?

조회 수: 3 (최근 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 CenterFile Exchange에서 Spline Construction에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by