|
7 | 7 | % p = bootnhst(DATA,GROUP,ref,bootfun,nboot)
|
8 | 8 | % p = bootnhst(DATA,GROUP,ref,bootfun,nboot)
|
9 | 9 | % p = bootnhst(DATA,GROUP,ref,bootfun,nboot,paropt)
|
10 |
| -% p = bootnhst(DATA,GROUP,ref,bootfun,nboot,paropt,bootsam) |
11 | 10 | % [p,c] = bootnhst(DATA,GROUP,...)
|
12 | 11 | % [p,c,stats] = bootnhst(DATA,GROUP,...)
|
13 |
| -% [p,c,stats,bootsam] = bootnhst(DATA,GROUP,...) |
14 | 12 | % bootnhst(DATA,GROUP,...);
|
15 | 13 | %
|
16 | 14 | % This non-parametric bootstrap function can be used for null hypothesis
|
|
88 | 86 | % workers should be predefined beforehand by starting
|
89 | 87 | % a parallel pool, else it will use the preferred number
|
90 | 88 | % of workers.
|
91 |
| -% |
92 |
| -% p = bootnhst(DATA,GROUP,ref,bootfun,nboot,paropt,bootsam) performs |
93 |
| -% bootstrap computations using the DATA row indices from bootsam for |
94 |
| -% the bootstrap (without the need for further resampling). |
95 | 89 | %
|
96 | 90 | % [p, c] = bootnhst(DATA,GROUP,...) also returns a 9 column matrix that
|
97 | 91 | % summarises post hoc test results. The family-wise error rate is
|
|
149 | 143 | % nboot - number of bootstrap resamples
|
150 | 144 | % bootstat - test statistic computed for each bootstrap resample
|
151 | 145 | %
|
152 |
| -% [p,c,stats,bootsam] = bootnhst(DATA,GROUP,...) also returns bootsam, |
153 |
| -% a matrix of indices from the bootstrap. Each column in bootsam |
154 |
| -% corresponds to one bootstrap sample and contains the row indices of |
155 |
| -% the values drawn from the nonscalar data to create that sample. |
156 |
| -% |
157 | 146 | % bootnhst(DATA,GROUP,...); performs the calculations as per above but
|
158 | 147 | % prints the columns 1, 2 and 5-7 of the results (c) in a pretty table.
|
159 | 148 | % The differences between groups are also plot along with the symmetic
|
|
183 | 172 | % along with this program. If not, see <http://www.gnu.org/licenses/>.
|
184 | 173 |
|
185 | 174 |
|
186 |
| -function [p, c, stats, bootsam] = bootnhst (data, group, ref, bootfun, nboot, paropt, bootsam) |
| 175 | +function [p, c, stats] = bootnhst (data, group, ref, bootfun, nboot, paropt) |
187 | 176 |
|
188 | 177 | % Check and process bootnhst input arguments
|
189 | 178 | nvar = size(data,2);
|
|
263 | 252 | end
|
264 | 253 | paropt.nproc = nproc;
|
265 | 254 | end
|
266 |
| - if nargin < 7 |
267 |
| - bootsam = []; |
| 255 | + if nargout > 6 |
| 256 | + error('bootnhst only supports up to 6 input arguments') |
268 | 257 | end
|
269 |
| - if nargout > 7 |
270 |
| - error('bootnhst only supports up to 7 input arguments') |
271 |
| - end |
272 |
| - if nargout > 4 |
273 |
| - error('bootnhst only supports up to 4 output arguments') |
| 258 | + if nargout > 3 |
| 259 | + error('bootnhst only supports up to 3 output arguments') |
274 | 260 | end
|
275 | 261 |
|
276 | 262 | % Group exclusion using NaN or Inf (excluded group becomes the last group in gnames and gk)
|
|
309 | 295 | % Perform resampling and calculate bootstrap statistics
|
310 | 296 | state = warning;
|
311 | 297 | warning off; % silence warnings about non-vectorized bootfun
|
312 |
| - if nargout > 3 |
313 |
| - [Q, bootsam] = bootstrp (nboot,func,data,'Options',paropt,'bootsam',bootsam); |
314 |
| - else |
315 |
| - Q = bootstrp (nboot,func,data,'Options',paropt,'bootsam',bootsam); |
316 |
| - end |
| 298 | + Q = bootstrp (nboot,func,data,'Options',paropt); |
317 | 299 | warning(state);
|
318 | 300 |
|
319 | 301 | % Calculate pooled (weighted mean) sampling variance using Tukey's jackknife
|
|
0 commit comments