Displaying 20 results from an estimated 3000 matches similar to: "group definition for a bootstrap"
2004 Jun 25
1
trouble using boot package
Hello,
I am trying to carry out a bootstrap analysis (using the boot package) on a
table and cannot work out how to get the results I need!
I have a table ("d2") with 4 columns: "ID_code", "Age", "Quarter" and
"StomWt". Age (0-5) and Quarter (1-4) are my strata
Therefore I wish to estimate the confidence intervals for the mean StomWt
for each Age
2005 Jan 14
5
subsampling
hi,
I would like to subsample the array c(1:200) at random into ten subsamples
v1,v2,...,v10.
I tried with to go progressively like this:
> x<-c(1:200)
> v1<-sample(x,20)
> y<-x[-v1]
> v2<-sample(y,20)
and then I want to do:
>x<-y[-v2]
Error: subscript out of bounds.
2003 Feb 12
1
Na/NaN error in subsampling script
R-help readers,
I''m having a problem with an R script (see below), which regularly generates the error message,
Error in start:(start + (sample.length - 1)) :
NA/NaN argument
, for which I am unsure of the cause.
In essence, the script (below) generates the start and end points for random subsamples from along a vector (in reality a transect (of a given length,
2011 May 21
2
unbalanced anova with subsampling (Type III SS)
Hello R-users,
I am trying to obtain Type III SS for an ANOVA with subsampling. My design
is slightly unbalanced with either 3 or 4 subsamples per replicate.
The basic aov model would be:
fit <- aov(y~x+Error(subsample))
But this gives Type I SS and not Type III.
But, using the drop() option:
drop1(fit, test="F")
I get an error message:
"Error in
2012 Aug 16
1
Big Data reading subsample csv
Hello,
I'm most grateful for your time to read this.
I have a uber size 30GB file of 6 million records and 3000 (mostly
categorical data) columns in csv format. I want to bootstrap subsamples for
multinomial regression, but it's proving difficult even with my 64GB RAM
in my machine and twice that swap file , the process becomes super slow
and halts.
I'm thinking about generating
2009 Apr 06
3
how to subsample all possible combinations of n species taken 1:n at a time?
Hello
I apologise for the length of this entry but please bear with me.
In short:
I need a way of subsampling communities from all possible communities of n
taxa taken 1:n at a time without having to calculate all possible
combinations (because this gives me a memory error - using
combn() or expand.grid() at least). Does anyone know of a function? Or can
you help me edit the
combn
or
2013 Mar 12
1
Bootstrap BCa confidence limits with your own resamples
I like to bootstrap regression models, saving the entire set of bootstrapped
regression coefficients for later use so that I can get confidence limits
for a whole set of contrasts derived from the coefficients. I'm finding
that ordinary bootstrap percentile confidence limits can provide poor
coverage for odds ratios for binary logistic models with small N. So I'm
exploring BCa confidence
2010 Aug 16
2
When to use bootstrap confidence intervals?
Hello, I have a question regarding bootstrap confidence intervals.
Suppose we have a data set consisting of single measurements, and that
the measurements are independent but the distribution is unknown. If
we want a confidence interval for the population mean, when should a
bootstrap confidence interval be preferred over the elementary t
interval?
I was hoping the answer would be
2002 Jan 21
2
a Bootstrap understanding problem
I tried to reproduce a result from a former colleague which he got
with S-plus bootstrap method. I don't have S-plus at hand.
In R, there are 2 packages related to bootstrap method, bootstrap and
boot. The former has a function called 'bootstrap' but this does not
seem to conform either to the function used in S-plus nor to that
described in MASS, 3d ed., p.144.
The latter seems to be
2007 Jan 26
1
bootstrap bca confidence intervals for large number of statistics in one model; library("boot")
Sometimes one might like to obtain pointwise bootstrap bias-corrected,
accelerated (BCA) confidence intervals for a large number of statistics
computed from a single dataset. For instance, one might like to get
(so as to plot graphically) bootstrap confidence bands for the fitted
values in a regression model.
(Example: Chiu S et al., Early Acceleration of Head Circumference in
Children with
2011 Mar 06
1
bootstrap
In the boot package,consider a scalar function to boot.
> estimator <- function(x, d) {
+ mean(x[d])
+ }
>
> data <- city$u
> b <- boot(data, estimator, R=1000)
> b$t0
[1] 64
> ci <- boot.ci(b, type=c("bca"), conf=.95)
> ci$bca
conf
[1,] 0.95 49.44 991.39 36.78807 110.0254
Now if I want estimators to return a vector,E.g. it's
{c(mean(x[d]),
2012 Mar 05
2
632 estimator using boot package
Dear All,
Anyone has some idea how to implement 632 estimator and leave-one out bootstraping method by using boot package. I know the bootstrap package has this function, but it sounds not very flexible for my project.
Thanks,
Jim
2007 Sep 04
1
bootstrap confidence intervals with previously existing bootstrap sample
Dear R users,
I am new to R. I would like to calculate bootstrap confidence intervals
using the BCa method for a parameter of interest. My situation is this: I
already have a set of 1000 bootstrap replicates created from my original
data set. I have already calculated the statistic of interest for each
bootstrap replicate, and have also calculated the mean for this statistic
across all the
2010 Feb 25
1
Help with simple bootstrap test
Hi all
Forgive me, I'm a total R newbie, and this seems to be a straightforward
simple bootstrap problem, but after a whole day of trying to figure out how
to do it I'm ready to give up. Part of the problem is that every example and
every help page seems to be about doing something more far more complex.
I'm got a table with 40 columns and 750 rows. I sum all the values across
the
2011 Apr 28
3
Speed up code with for() loop
Hallo everybody,
I'm wondering whether it might be possible to speed up the following code:
Error<-rnorm(10000000, mean=0, sd=0.05)
estimate<-(log(1.1)-Error)
DCF_korrigiert<-(1/(exp(1/(exp(0.5*(-estimate)^2/(0.05^2))*sqrt(2*pi/(0.05^2))*(1-pnorm(0,((-estimate)/(0.05^2)),sqrt(1/(0.05^2))))))-1))
D<-100000
Delta_ln<-rep(0,D)
for(i in 1:D)
2011 Sep 08
1
random sampling but with caveats!
Hi,
I wonder if someone can help me. I have built a gam model to predict the presence of cold water corals and am now trying to evaluate my model by splitting my dataset into training/test datasets.
In an ideal world I would use the sample() function to randomly select rows of data for me so for example with 936 rows of data in my HH dataset I might say
ss <- sample(nrow(HH), size =
2003 Aug 06
1
Standard error of standard deviation: bootstrap or theoretical results?
Dear R users,
This is more a statistical question rather than an R question. I'd
appreciate it if you can give me some suggestions.
I have a sample of a time series (sample size 500, fat tail in density). I
am trying to calculate the Standard error of standard deviation of a
sub-block-sample (sample size 250). I take 100 this kind of
sub-block-sample, randomly. For these 100 subsamples, I
2003 Jul 31
1
namespace magic
I'm confused about name spaces. This morning I installed the
boot package because I wanted to look at bca.ci. So I did
library(boot), but then I had,
> bca.ci
Error: Object "bca.ci" not found
I had a look in the boot R directory and bca.ci was there as expected.
So then I took a look at the NAMESPACE file for the boot package and saw
that bca.ci wasn't exported. I tried
2018 May 21
2
Bootstrap and average median squared error
Dear R-experts,
I am trying to bootstrap (and average) the median squared error evaluation metric for a robust regression. I can't get it. What is going wrong ?
Here is the reproducible example.
#############################
install.packages( "quantreg" )
library(quantreg)
crp <-c(12,14,13,24,25,34,45,56,25,34,47,44,35,24,53,44,55,46,36,67)
bmi
2011 May 19
2
Separating boot results
Good Morning,
I'm having what I hope to be a simple problem. I am generating bootstrap
confidence intervals using package (boot) - which works perfectly. The issue
I am having is getting the results into a format which I can write out to a
database. To be clear I am having no problems generating the results, I just
need to convert the format of the results such that I can store the results
in