[R] problems performing bootstrap
John Sorkin
jsorkin at grecc.umaryland.edu
Sat Apr 22 04:03:12 CEST 2006
R2.1.1
Windows XP
I have defined a function:
best<-function (x)
{
xx<-pmax(x[,1],x[,2])
pvalue<-t.test(xx,mu=100)
pvalue$p.value
}
and then I try to bootstrap best as follows:
> boot( array(rnorm(30,100,1),c(15,2)),best,R=100 )
and get the following message:
Error in statistic(data, original, ...) : unused argument(s) ( ...)
I would appreciate any help that you might offer.
Thanks,
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC and
University of Maryland School of Medicine Claude Pepper OAIC
University of Maryland School of Medicine
Division of Gerontology
Baltimore VA Medical Center
10 North Greene Street
GRECC (BT/18/GR)
Baltimore, MD 21201-1524
410-605-7119
jsorkin at grecc.umaryland.edu
More information about the R-help
mailing list