patchGNU Octave - Patches: patch #9925, [octave forge] (statistics)...


patch #9925: [octave forge] (statistics) bootstrp, bootci and ibootci

Submitted by:  Andrew Penn <acp29>
Submitted on:  Wed 22 Apr 2020 04:28:56 PM UTC  
Category:  Forge : new function Priority:  5 - Normal
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Wed 02 Sep 2020 04:19:43 PM UTC, comment #5: 

Sorry for the delayed reply. The parallel implementation is an conditional dependency allowing users to switch parallel on to speed up  calculations of bootci if they so wish. Regarding your last point Philip, I added an ErrorHandler to the call to parcellfun to more gracefully exit the if there is a problem implementing parallel in Octave. In anycase parallel does work so long as the /iboot folder and the /iboot/helper folder are saved to octaverc (not just added temporarily to the session using addpath as I have just found out). I added a comment in the readme to this effect. These changes are all in the development version on GitHub.

Andrew Penn <acp29>
Sat 30 May 2020 05:08:15 PM UTC, comment #4: 

There is no statistics package maintainer other than "The Octave-Forge Community". Which is a bit of a vague concept.
So the advice would be to post in the maintainers ML to ask one of the devs there to review your contributions.

The functions now make use of the parallel package. Is that an unconditional dependency (or can they also run w/o the parallel package)? If yes (unconditiona), do they gracefully catch the missing parallel package?
I'm asking because a.o., on Windows the parallel package has some limitations; I don't know if your functions would be affected.

Philip Nienhuis <philipnienhuis>
Project Member
Fri 29 May 2020 05:52:58 PM UTC, comment #3: 

You can try contacting the statistics package maintainer or posting to the maintainers mailing list to get attention on this patch report. Many patches sit here and are forgotten for months or years unfortunately, it may take patience and persistence from both you and the package maintainer to get these functions added to the package.

Mike Miller <mtmiller>
Project Administrator
Thu 07 May 2020 08:13:40 AM UTC, comment #2: 

Hi all,

I have now added to ibootci a feature to calculate BCa type bootstrap confidence intervals and this is compatible with different dependence structures of the data and bootstrap iteration. This involved addition of two new private functions (BCa.m and jack.m). Minor fixes in other files too (including ibootci.m and BC.m) The up-to-date version is available at:

I have been posting here info about this patch... but how does one actually go about adding it to the octave-forge package?



Andrew Penn <acp29>
Thu 30 Apr 2020 12:01:09 PM UTC, comment #1: 

Hi all,

I just added Octave support for parallel computing to accelerate data resampling for the generation of bootstrap confidence intervals using the iboot functions (previously this was only supported using Matlab's 'parfor'). The parallel computing acceleration of bootci, ibootci and bootstrp in Octave depends on the parallel computing Octave Forge package. I hadn't anticipated the quirks of parallel computing using this package and found that I had to take subfunctions out of the ibootci code and make them separate helper function files for the client processors to see them. The updated bootci, ibootci and bootstrp files (along with required helper and private functions) can be found at:

(The three files posted orginally are now out-of-date)


Andy Penn

Andrew Penn
Sussex Neuroscience
School of Life Sciences
University of Sussex
Brighton BN1 9QG
United Kingdom

Tel: +44 (0)1273 877049
E-mail: -email is unavailable-

Andrew Penn <acp29>
Wed 22 Apr 2020 04:28:56 PM UTC, original submission:  

Hi there,

I noticed that the Octave Forge 'Statistics' package currently doesn't have Matlab's bootstrp and bootci functions for bootstrap resampling and calculating bootstrap confidence intervals.

I have written a bootstrap confidence interval function compatible with Octave/Matlab called ibootci.m, which is available on GitHub

From a user perspective it has much the same syntax as Matlab's bootci function but has extended capabilities (double bootstrap) and extra functionality (some support for complicated dependence structures and improved interval coverage by bootstrap iteration).

I can provide this for the statistics package along with wrapper functions named bootstrp and bootci - To users, these closely resemble the corresponding Matlab functions, bootstrp and bootci, but without the bugs and errors in their implementation of the bootstrap.

I have attached three files bootstrp.m, bootci.m and ibootci.m (The matlab-like bootci and bootstrp both require my ibootci).

Interested? This is my first time contributing so suggestions are much appreciated

I have also various other related functions but none are designed to be like any Matlab function. Let me know if any of these other functions would be of interest (e.g. for calculation of p-values and confidence intervals for bootstrap one-sample and two-sample tests etc.). They can be found at:

Apologies in advance that the syntax doesn't completely conform to the standard you folk have. (Although I did test them all in Octave too and they worked fine). I'm afraid I don't have time right now to go through to tweak the but if anyone else does have the time and inclination they are welcome.


Andy Penn

Andrew Penn
Sussex Neuroscience
School of Life Sciences
University of Sussex
Brighton BN1 9QG
United Kingdom

Tel: +44 (0)1273 877049
E-mail: -email is unavailable-

Andrew Penn <acp29>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

Attached Files
file #48901:  bootstrp.m added by acp29 (3KiB - application/octet-stream)
file #48902:  ibootci.m added by acp29 (57KiB - application/octet-stream)
file #48903:  bootci.m added by acp29 (11KiB - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by acp29 (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-05-29 mtmiller Summary[octave-forge] statistics toolbox: bootstrp, bootci and ibootci => [octave forge] (statistics) bootstrp, bootci and ibootci
    2020-04-22 acp29 Attached File- => Added bootstrp.m, #48901
        Attached File- => Added ibootci.m, #48902
        Attached File- => Added bootci.m, #48903

    Back to the top

    Powered by Savane 3.5