diff --git a/inst/boot1way.m b/inst/boot1way.m index 57afd651..61411f81 100755 --- a/inst/boot1way.m +++ b/inst/boot1way.m @@ -259,7 +259,7 @@ end if ((nboot(2) == 0) && (~ strcmp (func2str (bootfun), 'mean'))) if (~ exist ('jackknife','file')) - if (ISOCTAVE); + if (ISOCTAVE) warning ('boot1way:jackfail', cat (2, '''jackknife'' function from', ... ' statistics package not found. nboot(2) set to 100.')) else @@ -434,7 +434,7 @@ theta(j) = mean (data(g == gk(j), :)); % Quick analytical calculation for the standard error of the mean SE(j) = std (data(g == gk(j), :), 0) / sqrt (nk(j)); - if (j == 1); se_method = 'Calculated without resampling'; end; + if (j == 1); se_method = 'Calculated without resampling'; end else theta(j) = bootfun (data(g == gk(j), :)); % If requested, compute unbiased estimates of the standard error using @@ -442,7 +442,7 @@ jackstat = jackknife (bootfun, data(g == gk(j), :)); SE(j) = sqrt ((nk(j) - 1) / nk(j) * ... sum (((mean (jackstat) - jackstat)).^2)); - if (j == 1); se_method = 'Leave-one-out jackknife'; end; + if (j == 1); se_method = 'Leave-one-out jackknife'; end end else % Compute unbiased estimate of the standard error by balanced bootknife @@ -453,7 +453,7 @@ bootout = bootknife (data(g == gk(j), :), [nboot(2), 0], bootfun, ... NaN, [], 0, [], [], ISOCTAVE, false, true); SE(j) = bootout.std_error; - if (j==1); se_method = 'Balanced, bootknife resampling'; end; + if (j==1); se_method = 'Balanced, bootknife resampling'; end end Var(j) = ((nk(j) - 1) / (N - k)) * SE(j)^2; end diff --git a/inst/bootlm.m b/inst/bootlm.m index 32fb61f0..262b7e50 100755 --- a/inst/bootlm.m +++ b/inst/bootlm.m @@ -545,7 +545,7 @@ case 'seed' SEED = value; otherwise - error (sprintf ('bootlm: parameter %s is not supported', name)) + error ('bootlm: parameter %s is not supported', name) end end @@ -681,8 +681,7 @@ % Check whether all the columns sum to 0 if (any (abs (sum (CONTRASTS{i})) > eps ('single'))) contr_sum_to_zero (i) = false; - warning (sprintf ( ... - 'Note that the CONTRASTS for predictor %u do not sum to zero', i)) + warning ('Note that the CONTRASTS for predictor %u do not sum to zero', i) else contr_sum_to_zero (i) = true; end @@ -690,8 +689,7 @@ if (any (abs (reshape (cov2corr (cov (CONTRASTS{i})) - ... eye (size (CONTRASTS{i}, 2)), [], 1)) ... > eps ('single'))) - warning (sprintf ( ... - 'Note that the CONTRASTS for predictor %u are not orthogonal', i)) + warning ('Note that the CONTRASTS for predictor %u are not orthogonal', i) end else if (~ ismember (lower (CONTRASTS{i}), ... @@ -715,8 +713,7 @@ if (~ isempty (DIM)) for i = 1:K if (~ contr_sum_to_zero (i)) - warning (sprintf ( ... - 'CONTRASTS for predictor %u have been set to ''anova''', i)) + warning ('CONTRASTS for predictor %u have been set to ''anova''', i) end end CONTRASTS(~ contr_sum_to_zero) = {'anova'}; @@ -1332,7 +1329,7 @@ plot (ax4_xlim, ones (1, 2), 'k--'); hold off; arrayfun (@(i) text (DI(i), D(DI(i)), ... - sprintf (' %u', DI(i))), [1:min(nk,n)]); + sprintf (' %u', DI(i))), 1:min(nk,n)); xlim (ax4_xlim); ylim (ax4_ylim); set (findall ( gcf, '-property', 'FontSize'), 'FontSize', 7) @@ -1486,7 +1483,7 @@ df(Nm+i) = prod (df(I-1)); termcols(1+Nm+i) = prod (df(I-1) + 1); tmp = ones (n,1); - for j = 1:numel(I); + for j = 1:numel(I) tmp = num2cell (tmp, 1); for k = 1:numel(tmp) tmp{k} = bsxfun (@times, tmp{k}, X{I(j)}); diff --git a/matlab/statistics-resampling.mltbx b/matlab/statistics-resampling.mltbx index b4e91901..232f33a5 100644 Binary files a/matlab/statistics-resampling.mltbx and b/matlab/statistics-resampling.mltbx differ diff --git a/matlab/statistics-resampling.prj b/matlab/statistics-resampling.prj index ef146b86..a17adbe1 100644 --- a/matlab/statistics-resampling.prj +++ b/matlab/statistics-resampling.prj @@ -1,5 +1,5 @@ - + statistics-resampling Andrew Penn andy.c.penn@gmail.com @@ -53,6 +53,10 @@ Y:\Documents\GitHub\statistics-resampling\inst\boot.m + Y:\Documents\GitHub\statistics-resampling\inst\boot.mexa64 + Y:\Documents\GitHub\statistics-resampling\inst\boot.mexmaci64 + Y:\Documents\GitHub\statistics-resampling\inst\boot.mexw32 + Y:\Documents\GitHub\statistics-resampling\inst\boot.mexw64 Y:\Documents\GitHub\statistics-resampling\inst\boot1way.m Y:\Documents\GitHub\statistics-resampling\inst\bootbayes.m Y:\Documents\GitHub\statistics-resampling\inst\bootcdf.m @@ -70,6 +74,10 @@ Y:\Documents\GitHub\statistics-resampling\inst\sampszcalc.m Y:\Documents\GitHub\statistics-resampling\inst\smoothmad.m Y:\Documents\GitHub\statistics-resampling\inst\smoothmedian.m + Y:\Documents\GitHub\statistics-resampling\inst\smoothmedian.mexa64 + Y:\Documents\GitHub\statistics-resampling\inst\smoothmedian.mexmaci64 + Y:\Documents\GitHub\statistics-resampling\inst\smoothmedian.mexw32 + Y:\Documents\GitHub\statistics-resampling\inst\smoothmedian.mexw64