bootstrap regression giving 2 different answers, not sure why
Mostra commenti meno recenti
Hi,
I am trying to generate confidence intervals for coefficients of a linear regression using the bootstrp() function in matlab. I am confused because when I call the function using two different methods that I believe should result in equivalent answers (code attached), I am getting different results from the bootstrp() function. I'm sure the issue is in my understanding of how the second method of calling bootstrp() is working, but I would appreciate insight into why this is and how to make the two calls have equivalent answers.
Thank you
%use sample data for this
load hald
x=[ones(size(heat)),ingredients]; %Vandermonde matrix
y=heat;
[bootstats_one]=bootstrp(10,'regress',y,x); %this method gives the correct results
[bootstats_two]=bootstrp(10,@(bootr)regress(bootr,x),y) %this gives different results
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Resampling Techniques in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!