[R] correlation with boot

ctu at bigred.unl.edu ctu at bigred.unl.edu
Tue Sep 2 04:17:11 CEST 2008


Hi R users,
I have one simple question but I really don't know why I can't get it work.
The data was adopted from Efron's An introduction to the bootstrap book.
> nlaw
       LSAT  GPA
  [1,]  576 3.39
  [2,]  635 3.30
  [3,]  558 2.81
  [4,]  578 3.03
  [5,]  666 3.44
  [6,]  580 3.07
  [7,]  555 3.00
  [8,]  661 3.43
  [9,]  651 3.36
[10,]  605 3.13
[11,]  653 3.12
[12,]  575 2.74
[13,]  545 2.76
[14,]  572 2.88
[15,]  594 2.96
> nlaw<-as.matrix(law[,-1])
> corr.t<-function(data){
+        return(boot::corr(data))
+        }
> law.boot<-boot(data=nlaw,statistic=corr.t,R=49)
Error in statistic(data, original, ...) : unused argument(s) (1:15)

many thanks for the help
Chunhao



More information about the R-help mailing list