Help generating bootstrap standard errors for parameters generated from fminunc?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Spline Construction dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!