tips:models_with_or_without_intercept

This shows you the differences between two versions of the page.

Both sides previous revision Previous revision | |||

tips:models_with_or_without_intercept [2021/10/29 10:55] Wolfgang Viechtbauer |
tips:models_with_or_without_intercept [2021/11/10 20:19] (current) Wolfgang Viechtbauer |
||
---|---|---|---|

Line 78: | Line 78: | ||

A different way of conducting the same test is to use the '' | A different way of conducting the same test is to use the '' | ||

<code rsplus> | <code rsplus> | ||

- | anova(res, L=rbind(c(0, | + | anova(res, X=rbind(c(0, |

</ | </ | ||

to test the two hypotheses | to test the two hypotheses | ||

Line 112: | Line 112: | ||

so this contrast reflects how different systematic allocation is compared to random allocation. Using the '' | so this contrast reflects how different systematic allocation is compared to random allocation. Using the '' | ||

<code rsplus> | <code rsplus> | ||

- | anova(res, L=c(0,-1,1)) | + | anova(res, X=c(0,-1,1)) |

</ | </ | ||

<code output> | <code output> | ||

Line 156: | Line 156: | ||

Signif. codes: | Signif. codes: | ||

</ | </ | ||

- | (I shortened the names of the coefficients in the output above to make the table under the ''L=c(0, | + | (I shortened the names of the coefficients in the output above to make the table under the ''X=c(0, |

==== Model Without Intercept ==== | ==== Model Without Intercept ==== | ||

Line 206: | Line 206: | ||

Again, we could use the '' | Again, we could use the '' | ||

<code rsplus> | <code rsplus> | ||

- | anova(res, L=rbind(c(1, | + | anova(res, X=rbind(c(1, |

</ | </ | ||

<code output> | <code output> | ||

Line 226: | Line 226: | ||

It is important to realize that this does not test whether there are differences between the different forms of allocation (this is what we tested earlier in the model that included the intercept term). However, we can again use contrasts of the model coefficients to test differences between the levels. Let's test all pairwise differences (i.e., between random and alternating allocation, between systematic and alternating allocation, and between systematic and random allocation): | It is important to realize that this does not test whether there are differences between the different forms of allocation (this is what we tested earlier in the model that included the intercept term). However, we can again use contrasts of the model coefficients to test differences between the levels. Let's test all pairwise differences (i.e., between random and alternating allocation, between systematic and alternating allocation, and between systematic and random allocation): | ||

<code rsplus> | <code rsplus> | ||

- | anova(res, L=rbind(c(-1, | + | anova(res, X=rbind(c(-1, |

</ | </ | ||

<code output> | <code output> | ||

Line 244: | Line 244: | ||

Note that the output does not contain an omnibus test for the three contrasts because the matrix with the contrast coefficients ('' | Note that the output does not contain an omnibus test for the three contrasts because the matrix with the contrast coefficients ('' | ||

<code rsplus> | <code rsplus> | ||

- | anova(res, L=rbind(c(-1, | + | anova(res, X=rbind(c(-1, |

</ | </ | ||

<code output> | <code output> |

tips/models_with_or_without_intercept.txt · Last modified: 2021/11/10 20:19 by Wolfgang Viechtbauer

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 4.0 International