[R] Simulation - Natrual Selection

Ben Ward benjamin.ward at bathspa.org
Wed Jan 5 16:48:46 CET 2011


Hi,

I've been modelling some data over the past few days, of my work, 
repeatedly challenging microbes to a certain concentration of cleaner, 
until the required concentration to inhibit or kill them increaces, at 
which point they are challenged to a slightly higher concentration each 
day. I'm doing ths for two different cleaners and I'm collecting the 
required concentration to kill them as a percentage, the challenge 
number, the cleaner as a two level variable, and the lineage theyre in, 
because I have several different lineages. I'm expecting the values to 
rise for one cleaner but not the other as they aqquire resistance for 
one but not the other. Which has happened, but I have wide variation 
because one linage aqquired a very dramatic change which has made it 
immune to 50%, whereas the others, have exhibited a much more gradual 
increace, and so I have very weak p values for the cleaner variable, 
because it is secondary to the challenge vector, which has the most 
explanatory power, because without time and these challenges, the 
selection would no happen.  I was using two bacterium species, but one 
was keen on giving hight erratic results, and insisted on becoming cross 
contaminated, BUT if I include it's data, It shoves cleaner over the 
p0.05 threshold, so i may just be having a problem with lack of data. So 
I've been asking about bootstrapping, which I plan to do to my cases, 
and thenfit a model to see what the confidence is like then. I assume if 
I bootstrap then it will re-select whole cases, and not jumble 
everything up, otherwise a microbe (totake the most extreme value as an 
example) with 50% concentration tolerance at the beginning, would make 
no sense at all. I'm also planning on doing models lineage by lineage, 
rather than putting them into one whole, just to have a look at what 
happens.

But what I really wanted to know from this email, was if there's a 
package or function for natrual selection simulation I could make use 
of, to see if I can simulate the experiment. I want to start with a 
distribution of concentration tolerance values, taken from the 
inhibitory concentration values from my first lot of microbes, back when 
term began. Draw 3000 from this. Then values in that draw that fall 
below the exposure concentration I did in my experiment, are removed, or 
have a high chance of being removed. Then, from what is left, a draw is 
made again - or perhaps a copy operation (rather than a random draw) 
until I have 3000 again, rather than have all exactly the same 
concentration, then a value can be added to some of them, that increaces 
their concentration tolerance slightly, but not by a great deal, except 
in a few individuals, where it may be increaced dramatically(some sort 
of exponential dstribution perhaps). Then when the distribution of this 
simulated population of microbes has reached the next concentration 
(possibly the mean or mode of the distribution) (I have a series of 1 in 
2 dilutions, so 100% 50%, 25% and so on), then they move on to the next 
concentration.

I know it's probably quite a heavy thing, it was just a thought that 
came to me, if anybody has any experience in this area of R or knows of 
something that allows this to be done, please let me know.

Thanks,
Ben.



More information about the R-help mailing list