Dear R-people,
I hope asking this is not too cheeky, but I do have a R Problem. I hope that some of you like to play around with R and can help me.

Its like this. I have several plant species (A,B,C) and 10 replicates per species. 5 plants per species are damaged, 5 not. I let a caterpillar feed on each plant and measured the growth of the caterpillars on control plants (CR) and on damaged plants (DR). The difference, DR-CR is an indicator for induced resistance IR.

The data could look like this...just as an example.

Species Control_CR      Damage_DR
A       10      2
A       9       3
A       7       4
A       9       2
A       8       3
B       5       4
B       6       3
B       4       2
B       5       4
B       6       3
C       8       1
C       6       2
C       4       4
C       7       1
C       6       2


Now, i want to see if there is a trade-off (or a negative correlation) between CR and IR, but because IR is calculated out of CR there is a danger of spurious correlation. What I have to do to get rid of it is the following:

1)Draw with replacement sets of 5 plants per treatment for each species

2)Calculate of those sets the means (in the control and the damage treatment) and then abstract the mean of the damage minus the mean of the control to get a mean for IR.

3)Randomize this IR (now called IRrandom)among all the species.
4)Go back to the data, calculate: Each of the 5 CR values minus this IRrandom to get 5 new DR, then draw again with replacements sets of 5 plants of each treatment for each species and calculate new means for the CR and the new DR. Now you have a mean CR and a new mean DR – you can calculate DR-CR to get a new IR (IRnew).

5)Correlate this CR with the new IR. And store the result.

6)Repeat step 1-5 many times. And make a histogram of the resulting corelation coefficients.


You see, this is quite complicated. Does any of you have any idea how to start? I am very very grateful for any suggestions!
The helper will get a parcel with swiss chocolate ;-)  !!

Best wishes from Bern,
Anne


--
Anne Kempel
Institute of Plant Sciences
University of Bern
Altenbergrain 21
CH-3103 Bern
kem...@ips.unibe.ch

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to