Skip to content

Commit cd4037e

Browse files
committed
Updated information in online manual for bootlm function
1 parent e1d6d27 commit cd4037e

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

inst/bootlm.m

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,9 +375,7 @@
375375
% from the residual standard deviation, which is estimated from the
376376
% standard errors and the sample sizes. As such, the effect sizes
377377
% calculated exclude variability attributed to other predictors in
378-
% the model. To avoid small sample bias inflating effect sizes for
379-
% posthoc comparisons when use the 'bayesian' method, use the 'auto'
380-
% setting for the prior.
378+
% the model.
381379
%
382380
% '[...] = bootlm (Y, GROUP, ..., 'seed', SEED)' initialises the Mersenne
383381
% Twister random number generator using an integer SEED value so that
@@ -2172,6 +2170,16 @@
21722170
%! STATS = bootlm (score, gender, 'display', 'on', 'varnames', 'gender', ...
21732171
%! 'dim', 1, 'posthoc','trt_vs_ctrl');
21742172
%!
2173+
%! % Standardized effect size (Cohen's d) with 95% confidence intervals and
2174+
%! % total sample size for the difference in mean score between males and
2175+
%! % females (computed by wild bootstrap)
2176+
%! STATS = bootlm (score, gender, 'display', 'on', 'varnames', 'gender', ...
2177+
%! 'dim', 1, 'posthoc','trt_vs_ctrl', 'standardize', true, ...
2178+
%! 'method', 'wild');
2179+
%!
2180+
%! fprintf ('Cohen''s d [95%% CI] = %.2f [%.2f, %.2f] (N = %u)\n\n', ...
2181+
%! STATS.estimate, STATS.CI_lower, STATS.CI_upper, STATS.N)
2182+
%!
21752183
%! % Standardized effect size (Cohen's d) with 95% credible intervals and
21762184
%! % total sample size for the difference in mean score between males and
21772185
%! % females (computed by bayesian bootstrap)
@@ -2213,6 +2221,23 @@
22132221
%! 'varnames', {'subject','treatment'}, ...
22142222
%! 'dim', 2, 'posthoc','trt_vs_ctrl');
22152223
%!
2224+
%! % Standardized effect size (Cohen's d) with 95% confidence intervals and
2225+
%! % total sample size for the difference in mean score before and after
2226+
%! % treatment (computed by wild bootstrap). In this particular case,
2227+
%! % rather than the full model, we have opted for an estimate of the classic
2228+
%! % Cohen's d by refitting the model as a between-subjects design. (It is
2229+
%! % possible to get the standardized effect size from the full model instead,
2230+
%! % but this does change the interpretation of the effect size - ensure that
2231+
%! % your methods are properly documented with reports of standardized effect
2232+
%! % sizes)
2233+
%! STATS = bootlm (score, {treatment}, 'standardize', true, 'model', 'linear', ...
2234+
%! 'display', 'on', 'varnames', 'treatment', ...
2235+
%! 'dim', 1, 'posthoc','trt_vs_ctrl', ...
2236+
%! 'method', 'wild');
2237+
%!
2238+
%! fprintf ('Cohen''s d [95%% CI] = %.2f [%.2f, %.2f] (N = %u)\n\n', ...
2239+
%! STATS.estimate, STATS.CI_lower, STATS.CI_upper, STATS.N)
2240+
%!
22162241
%! % Standardized effect size (Cohen's d) with 95% credible intervals and
22172242
%! % total sample size for the difference in mean score before and after
22182243
%! % treatment (computed by bayesian bootstrap). In this particular case,

0 commit comments

Comments
 (0)