No BSD License  

Highlights from
Bootstrap a statistic in a grouped sample

5.0

5.0 | 1 rating Rate this file 5 Downloads (last 30 days) File Size: 37.75 KB File ID: #14411
image thumbnail

Bootstrap a statistic in a grouped sample

by Dimitri Shvorob

 

25 Mar 2007 (Updated 26 Mar 2007)

(Extension of BOOTSTRP)

| Watch this File

File Information
Description

Function BSTRAG builds on an earlier FEX submission, BSTRAP - itself an extension of BOOTSTRP (Statistics Toolbox, v. 5-6) - by implementing 'groupwise' operation, wherein rows of x (,y,z,..) are split into several groups (having n1, n2, n3, .. rows), marked by distinct values of grouping variable c, and each resampling iteration randomly selects n1 rows from group 1, n2 rows from group 2, etc.

Syntax of BSTRAG is similar to that of BSTRAP, but differs in requiring an extra input argument, group-assignment vector, which must also be supplied to the function computing (matrix- or structure-valued) bootstrapped statistics.

Function BSTATS inputs an array or a structure array produced by BSTRAP, and outputs means, variances and (2.5%, 97.5%) percentiles of the bootstrap distributions. (Percentiles are calculated using PRCTILE of Statistics Toolbox - replacing it with a user-contributed analog should be straightforward).

See BSTRAG_DEMO and BSTRAP_DEMO for examples.

MATLAB release MATLAB 7.0.1 (R14SP1)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
10 Apr 2007 Dimitri Shvorob

Bug fix: line 122 should read
res = nan(n1,n2,b+1);
('n' replaced with 'b')

12 Apr 2007 Emmanuel Ikechukwu Mba

They are wonderful

20 Apr 2007 Dimitri Shvorob

The function will be shortly updated, for consistency with BSTRAP (http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=14664&objectType=FILE)

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
statistics Dimitri Shvorob 22 Oct 2008 09:05:58
probability Dimitri Shvorob 22 Oct 2008 09:05:58
bootstrap resampling Cristina McIntire 06 Feb 2009 10:34:17
group Cristina McIntire 06 Feb 2009 10:34:17
block Cristina McIntire 06 Feb 2009 10:34:17

Contact us at files@mathworks.com