x-rnorm(20)
mean(x)
[1] -0.2272851
results-boot(x,mean,R=5)
What in the world am I missing??
See http://www.mayin.org/ajayshah/KB/R/statistics.html
--
Ajay Shah Consultant
[EMAIL PROTECTED] Department of Economic
What in the world am I missing??
x-rnorm(20)
mean(x)
[1] -0.2272851
results-boot(x,mean,R=5)
results[2]
$t
[,1]
[1,] -0.2294562
[2,] -0.2294562
[3,] -0.2294562
[4,] -0.2294562
[5,] -0.2294562
Jeff Morris
Ortho-Clinical Diagnostics
A Johnson Johnson Co.
Rochester, NY
Tel: (585)
On Thu, 1 Apr 2004 17:19:55 -0500 Morris, Jeffrey [OCDUS] wrote:
What in the world am I missing??
The help page?
As help(boot) tells you:
statistic: snip
In all other cases 'statistic'
must take at least two arguments. The first argument passed
will always be
You have to let boot pass the index for selection to the function as well.
So, for example, try:
boot.mean - function(data, index)
mean(data[index])
results - boot(x, boot.mean, R=5)
Andrew.
On Thursday 01 April 2004 14:19, Morris, Jeffrey [OCDUS] wrote:
What in the world am I
What you are missing is reading the helpfile!
The function mean is not a valid statistic to be passed to boot
function(x, i) mean(x[i])
is.
Please do read the documentation. That's why it is provided.
--
| Angelo J. Canty
What in the world am I missing??
stype. As in (from help(boot)
stype: A character string indicating what the second argument of
statistic represents. Possible values of stype are 'i'
(indices - the default), 'f' (frequencies), or 'w'
(weights).
This works.