Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Ben Ward
You mentioned the boot package, I've just stumbled across a package called simpleboot, with a function lm.boot. Would this be suitable - it says I can sample cases from the origional dataset, as well as from the residuals of a model. Not all the options I understand but I assume the defaults mi

Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Ben Ward
Ok I'll check I understand: So it's using sample, to resample d once, 10 values, because the rnorm has 10 values, with replacement (I assume thats the TRUE part). Then a for loop has this to resample the data - in the loop's case its 1000 times. Then it does a lm to get the coefficients and add

Re: [R] Resampling to find Confidence intervals

2011-01-04 Thread Dieter Menne
Axolotl9250 wrote: > > ... > resampled_ecoli = sample(ecoli, 500, replace=T) > coefs = (coef(lm(MIC. ~ 1 + Challenge + Cleaner + Replicate, > data=resampled_ecoli))) > sd(coefs) > > ... > Below a simplified and self-consistent version of your code, and some changes Dieter # resample d = dat

[R] Resampling to find Confidence intervals

2011-01-03 Thread Ben Ward
Hi, I'm doing some modelling (lm) for my 3rd year dissertation and I want to do some resampling, especially as I'm working with microbes, getting them to evolve resistance to antimicrobial compounds, and after each exposure I'm measuring the minimum concentration required to kill them (which I'