0
$\begingroup$

hope everybody is good during this period.

I was trying to run two-way ANOVA test for my sample, but further I go with script in R I feel less confident that this is the best way to analyze my data:

I have eleven Proteins (Protein_name), with some values that I want to compare, it looks like this:

Protein_name    holo_1      holo_2
A1              82.3965243  70.91176151
B1              27.26637961 47.63355456
C1              97.75786493 64.92764661
D1              115.9354513 127.4018061
E1              130.4860545 163.4261778
F1              57.13565305 142.0628876
G1              88.66907173 87.42791862
H1              184.2934171 150.3209662
I1              95.70968618 68.99684474
J1              53.80736258 79.40920466
K1              166.5425346 97.48123164

So eleven of these letters (proteins). I have normalized my raw data and I just want to know if two-way ANOVA test would be convenient to compare:

*holo1 to holo2 (11 to 11) - to see if overall holo1 is statistically different from holo2 or other way around. *holo1 over 11 proteins *holo2 over 11 proteins

Anybody more experience has some advice?

$\endgroup$

1 Answer 1

0
$\begingroup$

You have main effects Protein (3 levels) and Holo (2-levels), with only one observation per cell and thus there is no interaction term in your model.

Without formally using a dataframe I put your data into R as follows (rounding observations to one place, which seems harmless):

x = c(82.4, 27.3, 97.8, 70.9, 47.6, 64.9)
h = as.factor(c(1,1,1,2,2,2))
p = as.factor(c(1,2,3,1,2,3))

Data table for proofreading:

cbind(x,h,p)
        x h p
[1,] 82.4 1 1
[2,] 27.3 1 2
[3,] 97.8 1 3
[4,] 70.9 2 1
[5,] 47.6 2 2
[6,] 64.9 2 3

Then the 2-way ANOVA table can be obtained as follows:

AOV.OUT = aov(x~h+p)
summary(AOV.OUT)

            Df Sum Sq Mean Sq F value Pr(>F)
h            1   96.8    96.8   0.270  0.655
p            2 2324.0  1162.0   3.243  0.236
Residuals    2  716.6   358.3          

There are no significant effects. One can notice that the scores for Protein B1 were smallest for both levels of Holo, but not markedly enough to rise to significance.

This procedure assumes normal data, but six residuals are not enough for a usefully powerful Shapiro-Wilk test to check that assumption. Here is the procedure for that test:

shapiro.test(AOV.OUT$resi)

        Shapiro-Wilk normality test

data:  AOV.OUT$resi
W = 0.90772, p-value = 0.4216

For future reference doing two-way ANOVAs: If you search online for 'two-way ANOVA R' you will find several help pages, some much more complicated than necessary.

$\endgroup$
6
  • $\begingroup$ I see, I have updated my sample to 11 proteins, this is only 3 samples I have given as example. I was following this website [sthda.com/english/wiki/two-way-anova-test-in-r], but in all types of examples people have different types of data, that I find hard to logically implement into my type of comparisons, so always end up having problem plotting a data, considering that of course R is not a language I am comfortable to use. $\endgroup$
    – sergio
    Commented Apr 2, 2020 at 7:27
  • $\begingroup$ Perhaps if you follow the same pattern of commands shown in my answer for your complete dataset, you will find a significant effect. If so, you show the ANOVA table in you Question and ask whatever questions arise in discussing significant results. $\endgroup$
    – BruceET
    Commented Apr 2, 2020 at 7:33
  • $\begingroup$ Sure, can you just show me the command you have used to generate x, h and p? $\endgroup$
    – sergio
    Commented Apr 2, 2020 at 7:35
  • $\begingroup$ No command, just data entry. Now your 'p' will have 11 levels. You could save some typing with 'h= rep(1:2, each=11)' and 'p = rep(1:11, 2)'. Then maybe check results with 'cbind(x, h, p)`. Wishing you success. Past bedtime here. $\endgroup$
    – BruceET
    Commented Apr 2, 2020 at 7:40
  • $\begingroup$ Hey, I have managed to get output for my whole data, ny following your commands. Would you mind if I edit my question and if you can help me just to analyze it? $\endgroup$
    – sergio
    Commented Apr 2, 2020 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.