[R] (no subject)

Zaihra T zaihra at uwindsor.ca
Tue Mar 25 19:54:34 CET 2008


   I have a problem,  would really appreciate if  anyone  could help me. I am
   trying to use bootstrap to resample a dataframe n then use that sample of
   dataframe to calcuate parameter estimates using betabinomial model. I am
   kind of lost coz the bootstrap function requires us to give statistic (A
   function  which  when  applied to data returns a vector containing the
   statistic(s) of interest) .

   my dataframe looks like :

   y<-c(1,0,2,2,1,0,1)

   n<-rep(2,length(y))

   z1<-rep(1,length(y))

   z2<-(1,0,1,1,1,1,0)

   mydata<-as.data.frame(cbind(n,y,z1,z2))

   now  !  this  dataframe has seven observations . i want to get smaller
   dataframe say with 3 observations instead of seven and then use it to fit
   betabinomila model .. i want to uses boot (to generate bootstrap sample) and
   then for each sample i have to fit betabinomial model ( using betabin and
   extract   regression co-efficients...) and finally report avg of these
   regression co-efficients along with average SE . Can someone plz help.


More information about the R-help mailing list