|
375 | 375 | % from the residual standard deviation, which is estimated from the
|
376 | 376 | % standard errors and the sample sizes. As such, the effect sizes
|
377 | 377 | % 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. |
381 | 379 | %
|
382 | 380 | % '[...] = bootlm (Y, GROUP, ..., 'seed', SEED)' initialises the Mersenne
|
383 | 381 | % Twister random number generator using an integer SEED value so that
|
|
2172 | 2170 | %! STATS = bootlm (score, gender, 'display', 'on', 'varnames', 'gender', ...
|
2173 | 2171 | %! 'dim', 1, 'posthoc','trt_vs_ctrl');
|
2174 | 2172 | %!
|
| 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 | +%! |
2175 | 2183 | %! % Standardized effect size (Cohen's d) with 95% credible intervals and
|
2176 | 2184 | %! % total sample size for the difference in mean score between males and
|
2177 | 2185 | %! % females (computed by bayesian bootstrap)
|
|
2213 | 2221 | %! 'varnames', {'subject','treatment'}, ...
|
2214 | 2222 | %! 'dim', 2, 'posthoc','trt_vs_ctrl');
|
2215 | 2223 | %!
|
| 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 | +%! |
2216 | 2241 | %! % Standardized effect size (Cohen's d) with 95% credible intervals and
|
2217 | 2242 | %! % total sample size for the difference in mean score before and after
|
2218 | 2243 | %! % treatment (computed by bayesian bootstrap). In this particular case,
|
|
0 commit comments