[R] Between subjects repeated measures ANOVA help. Level: Novice.

Dear community,

I am fairly new to the field of statistics and R and I apologise if my problem seems to be too basic.

In my research I have performed a series of measurements on 5 different brands of blocks. Each block has been inspected for deformation under incremental forces (20, 30, 40, 50, 60, 70, 80, 90, 100, 110 and 120 N). The deformation for each force was measured 3 times and the mean values were assigned to each brand for a specific amount of force. I was successful in creating linear regression graphs for these 5 different brands.

Now my wish is to see whether a brand makes a significant difference in deformation values and to perform a post-hoc to compare brands among themselves. In other words to compare the linear regression lines. Sorry if what I am saying makes no sense.

So far, I have tried the following commands:
anova(lm(Deformation~Force*Brand, data=Data), lm(Deformation~Force, data=Data))

and

aov.data = aov(Deformation~Force*Brand, Data)

and gotten suspiciously low P values (***) which clearly indicates that I might be doing something wrong. I would be grateful if you could help me with this issue.

Re: [R] Between subjects repeated measures ANOVA help. Level: Novice.

I'd check out the ez.anova function from the ez package for R. What you have done appears to be hierarchical linear regression (block wise testing) and haven't taken care of the nonindependent error terms. Also andy field has en excellent R book that covers this type of testing in a very approachable way within the R program.

"If you torture the data long enough it will eventually confess."
-Ronald Harry Coase -

Re: [R] Between subjects repeated measures ANOVA help. Level: Novice.

I don't think this problem seems “too basic”, on the contrary for me.

When you have a p-value that is really low, it simply means that something is significant.

There is a statistical significant difference between brands p=0.011<0.05, so it is significant at the 5% level. And force is significant with p-value=2*10^-16 which is clearly less than 0.05.

And “blah blah” there is just one replicate per cell so interactions can not be estimated and tested.

Maybe there are some hierarchical structures here. But for the moment I just assume that it was a completely randomized experiment. I am not sure if I am familiar with the model structure trinker suggest. Suggestions about models and evaluation, anybody?

Re: [R] Between subjects repeated measures ANOVA help. Level: Novice.

I agree with Greta, this is not a repeated measures problem unless Brand is considered to be a random factor (in which case we would have repeated measurements on each random unit, which is what is classically considered a "repeated measures" situation). Since I assume we are not considering Brands to be random here, this analysis seems as straightforward as Greta indicated.

“In God we trust. All others must bring data.”
~W. Edwards Deming

Re: [R] Between subjects repeated measures ANOVA help. Level: Novice.

Dear repliers,

I may have addressed my problem in a wrong way. By repeated measures I meant different forces (20 N, 30 N, 40 N,...) I wanted to compare deformations over the whole series 20 N - 120 N for different brands so that I can say: "brand has a significant influence on deformation in the whole 20 N to 120 N measurement series"; and "Brand2 showed the least deformation, Brand5 showed the most deformation" throughout measurements.

I want to see if brand influences regression lines significantly.

Once more, I am sorry if I said something utterly stupid.

Re: [R] Between subjects repeated measures ANOVA help. Level: Novice.

Thank you Greta for the code, I will run it in about 2 hours when I get home from work. This is my doctoral thesis that I am working on, your help is greatly appreciated. I wish I could buy you a dinner or something for doing this

I hope I can ask you for further assistance when I run the code. Unfortunately, my biomedical background makes me an idiot for statistics.

Re: [R] Between subjects repeated measures ANOVA help. Level: Novice.

I have run the code and am very pleased with the outcome. However, I still have things that remained unclear.
Let me see if I got this well. This is the ANOVA table:

Code:

Analysis of Variance Table
Response: Deformation
Df Sum Sq Mean Sq F value Pr(>F)
brand.f 4 1.810 0.4525 3.7116 0.01162 *
force.f 10 124.076 12.4076 101.7711 < 2e-16 ***
Residuals 40 4.877 0.1219
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

So basically brand.f Pr(>F) 0.01162 means that P is 0.01162, which is <.05 and statistically significant. The force significance is something I am not interested in, because it obviously influences deformation. What do residuals mean?

My second question regards summary( lm (Deformation ~ brand.f + force.f , dat)), which gives me this table:

Re: [R] Between subjects repeated measures ANOVA help. Level: Novice.

I am glad that you are not working for the KGB or the CIA, in that you dare to show us your data. Most posters here seems to deal with government secrets in that they don't dare to even show a small example of their data. Then it is difficult to suggest or advice.

What kind of material is it that is deformed?

If you Edit your above post with the computer printout and highlight it and click on the #-symbol (the code symbol) I believe that it will be easier to read (in courier new) in straight columns.

If you are not familiar with “residuals” you need to study linear regression more. Look at any elementary text book and search the web. Essentially it is the observed value – predicted value.

The Brand 1 and the lowest level of force is not included as separate estimates because they are included in the “intercept”. So they act as reference values. (Look around. That has been discussed here at the forum the last days.)

Did you randomize the experiment and in particular the order of the 5*11=55 experiments?
(And did you use formally random numbers?)

Is there anybody who want to do the check on residuals and so on on this model (where the variables are created in the code above)?

Re: [R] Between subjects repeated measures ANOVA help. Level: Novice.

This:

I am glad that you are not working for the KGB or the CIA, in that you dare to show us your data. Most posters here seems to deal with government secrets in that they don't dare to even show a small example of their data. Then it is difficult to suggest or advice.