Hello,
Your code works with me, unchanged:
> boot<-boot(c,table,100, sim="ordinary",
stype="i",simple=TRUE)
> boot
ORDINARY NONPARAMETRIC BOOTSTRAP
Call:
boot(data = c, statistic = table, R = 100, sim = "ordinary",
stype = "i", simple = TRUE)
Bootstrap Statistics :
original bias std. error
t1* 500.5 0.76209 8.876232
But your error message shows a typo in 'simlpe' so, check your typing.
Also, 'c', 'table' and 'boot' are really bad names for
data objects or
functions, they already are R functions.
Hope this helps,
Rui Barradas
Em 25-06-2012 08:26, he chen escreveu:> I am doing boot with a large database, thus want to use simple=TRUE to
> reduce the memory used.
> I alreday set up sim="ordinary", stype="i" , but I
don't know how to
> set "n=0". In fact, I don't know what does "n=0"
mean?
> For example,
>
> a<-c(1:1000)
> b<-c(2:1001)
> c<-cbind(a,b)
>
> library(boot)
> table<-function(c,indices){
> d<-c[indices,]
> e<-mean(d[,1])
> return(e)
> }
>
> boot<-boot(c,table,100, sim="ordinary",
stype="i",simple=TRUE)
>
>
> AND, r give "Error in statistic(data, original, ...) : unused
> argument(s) (simlpe = TRUE)"
>
> Thanks a lot!
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>