[R] Feedback Bootstrapping
Guido Parra
guido.parravergara at jcu.edu.au
Mon Aug 4 02:04:28 CEST 2003
Dear experienced R-users,
I am having some probably trivial trouble estimating the confidence interval
for the difference of two group means, with groups been of unequal sample
size. I am using the "Bootstrap" package and the function
"bcanon"(bcanon(x, nboot, theta, ...,alpha=c(0.025, 0.05, 0.1, 0.16, 0.84,
0.9, 0.95, 0.975)) for Nonparametric BCa confidence limits.
The data is the following:
> distland
$scland
[1] 1118.0 707.1 2121.3 1802.8 2000.0 10606.6 10977.2
$obland
[1] 4717.0 3605.6 10049.9 9513.1 1802.8 1118.0 500.0 500.0 2549.5
[10] 500.0 3000.0 6000.0 2000.0 2549.5 2061.6 4924.4 2692.6
In using bcanon I have tried the following:
> diff.means<-function(x) {mean(distland$scland)-mean(distland$obland)}
> bcanon(distland,100,diff.means)
$confpoints
alpha bca point
[1,] 0.025 NA
[2,] 0.050 NA
[3,] 0.100 NA
[4,] 0.160 NA
[5,] 0.840 NA
[6,] 0.900 NA
[7,] 0.950 NA
[8,] 0.975 NA
$z0
[1] -Inf
$acc
[1] NaN
$u
[1] 773.7227 773.7227
$call
bcanon(x = distland, nboot = 100, theta = diff.means)
I am a new user of R and can't understand what is happening and why the
conf. limits are all NA, any
ideas on what is wrong with the code, or suggestions will be much appreciated.
Thank you
Guido Parra
More information about the R-help
mailing list