[R-lang] Re: Coding

Steven Piantadosi piantado@mit.edu
Fri Jun 18 16:07:35 PDT 2010


Hey Peter,

I am not very experienced with fancy coding, so maybe someone can
correct what I say that's wrong (actually, that would be very helpful
for me continuing to learn about this). 

But just from the start, if you say

D > E1 > F1 > E2 > F2

then you mean that D is greater than each of E1, F1, etc. But in Helmert
coding, I think you are comparing D to the mean of E1,F1,E2,F2. So if
the result comes out, it doesn't necessarily tell you that D > E1. For
example, suppose my means are

D = 1
E1 = 0.999
F1 = 0.3
E2 = 0.2
F2 = 0.1

The helmert coding regression results could come out since D is very
different from the mean of E1,F1,E2,F2, but really that doesn't tell you
that D > E1 is statistically significant. I think what you actually want
is something like "Forward Difference Coding" for your first 8-level
comparison. Is that right, or am I confused?

As for your mini-2x2s, I don't know, but it seems like you still don't
want Helmert coding. 

++Steve



> Dear R-lang,
> 
> I have a question regarding the interpretation of different coding 
> schemes in a regression model. My experiment compares 8 different levels 
> of a single independent variable. Additionally, it is possible to 
> conceive of 4 of these 8 levels as a mini-2x2 within the 8 level variable:
> 
> Cells: A, B, C, D, E-1, E-2, F-1, F-2
> 
> I hypothesize the following ordering (which is substantiated by the 
> overall means in the different conditions):
> 
> ABC>D>E1>F1>E2>F2
> 
> Additionally, I hypothesize that E>F and 1>2. I have implemented 2 
> different models to test these hypotheses and I would like to hear your 
> take on what the correct interpretation of the results is. In model 1 
> have have Helmert-coded the hypothesized ordering in terms of the 
> following five contrasts:
> 
> ABCvDE1F1E2F2
> DvE1F1E2F2
> E1vF1E2F2
> F1vE2F2
> E2vF2
> 
> All Helmert-contrasts are significant. In model 2 I have used the 
> following contrasts instead:
> 
> ABCvDE1F1E2F2
> DvE1F1E2F2
> EvF
> 1v2
> 
> All contrasts except EvF are significant. Collinearity is minimal in 
> both models (all correlations below |.2|)
> 
> Is it fair to say that the ABC>D>E1>F1>E2>F2 has been substantiated by 
> the experiment and thus infer that E>F, even though the EvF contrast is 
> not significant in a differently coded model?
> 
> Thank you very much in advance for your help,
> 
> Best,
> 
> Peter Graff




More information about the ling-r-lang-L mailing list