[R] Confidence interval from resampling

2011-06-23 Thread Adriana Bejarano
Dear R gurus, I have the following code, but I still not know how to estimate and extract confidence intervals (95%CI) from resampling. Thanks! ~Adriana #data penta<-c(770,729,640,486,450,410,400,340,306,283,278,260,253,242,240,229,201,198,190,186,180,170,168,151,150,148,147,125,117,110,107,104

[R] Help with bootstrapping regression

2009-06-29 Thread Adriana Bejarano
Dear R gurus, I have the following x (conc)-y (rk) data. rk<-c(0.016,0.032,0.048,0.095,0.111,0.143,0.190,0.206,0.222,0.270,0.286,0.302,0.317,0.381,0.397,0.444,0.460, 0.476,0.492,0.508,0.524,0.540,0.556,0.651,0.698,0.714,0.810,0.825,0.841,0.921,0.937,0.952,0.968,0.984,1.000) cc<-c(0.4,0.53,1,1.5

[R] for loop help

2008-01-29 Thread Adriana Bejarano
Hi, I have written the following code which works fine step<-5 numSim<-15 N<-double(numSim) A<-double(numSim) F<-double(numSim) M<-double(numSim) genx<-double(numSim) for (i in 1:numSim) { N[i]<-20 PN<-(runif(N[i], 0, 1)) A[i]<-sum(ifelse(PN>0.2, 1, 0)) PF<- runif((A[i]*0.5