The release () command is an abbreviated method for your question. What he does is reorder the factor so that the ref level is first. Therefore, reordering your factor levels will also have the same effect, but give you more control. Perhaps you wanted to have levels 3,4,0,1,2. In this case...
bFactor <- factor(b, levels = c(3,4,0,1,2))
I prefer this method because it is easier for me to see in my code not only what was the link, but also the position of other values ββ(instead of looking at the results for this).
NOTE: DO NOT make this an ordered factor. A factor with a specified order and an ordered factor is not the same thing. lm () may start to think that you want polynomial contrasts if you do.
John 06 Oct 2018-10-06 13:16
source share