Posts Tagged ‘ contrasts ’

Example 9.24: Changing the parameterization for categorical predictors

March 22, 2012
By
Example 9.24: Changing the parameterization for categorical predictors

In our book, we discuss the important question of how to assign different parameterizations to categorical variables when fitting models (section 3.1.3). We show code in R for use in the lm() function, as follows:lm(y ~ x, contrasts=list(x,"contr.trea...

Read more »

Testing the Effect of a Factor within each Level of another Factor with R-Package {contrast}

February 27, 2012
By
Testing the Effect of a Factor within each Level of another Factor with R-Package {contrast}

This is a small example of how custom contrasts can easily be applied with the contrast-package. The package-manual has several useful explanations and the below example was actually grabbed from there.This example can also be applied to a GLM but I ch...

Read more »

Two-Way PERMANOVA (with Vegan-Function adonis) Using Customized Contrasts

August 8, 2011
By
Two-Way PERMANOVA  (with Vegan-Function adonis) Using Customized Contrasts

...say you have a multivariate dataset and a two-way factorial design - you do a PERMANOVA and the aov-table (adonis is using ANOVA or "sum"-contrasts) tells you there is an interaction - how to proceed when you want to go deeper into the ana...

Read more »

Example 8.9: Contrasts

October 12, 2010
By
Example 8.9: Contrasts

In example 8.6 we showed how to change the reference category. This is the natural first thought analysts have when their primary comparisons aren't represented in the default output. But our interest might center on a number of comparisons which don...

Read more »