Displaying 20 results from an estimated 20000 matches similar to: "bootstrap: boot package"
2000 Aug 25
1
S objects
Is it possible for R to "read in" S objects. For example, suppose
that when using S I did:
> x <- c(1,2,3)
> y <- x^2
> q()
These objects are now in the .Data directory. If I then want to use x
and y in an R session, how can I do so?
Thanks,
Rob
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2007 Oct 03
2
Shading area under density curves
Hello,
I have a question regarding shading regions under curves to display
95% confidence intervals. I generated bootstrap results for the slope
and intercept of a simple linear regression model using the following
code (borrowed from JJ Faraway 2005):
> attach(allposs.nine.d)
> x<-model.matrix(~log(d.dist,10))[,-1]
> bcoef<-matrix(0,1000,2)
> for(i in 1:1000){
+
2007 Feb 05
3
Confidence intervals of quantiles
Can anyone please tell me if there is a function to calculate confidence
intervals for the results of the quantile function.
Some of my data is normally distributed but some is also a squewed
distribution or a capped normal distribution. Some of the data sets contain
about 700 values whereas others are smaller with about 100-150 values, so I
would like to see how the confidence intervals change
2008 Aug 20
3
Confidence Interval
Hi!
With the following script, I'm trying to make a demonstration of a
Confidence Interval, but I'm observing some differences on tails.
# Teste de média entre uma amostra e uma população normal
# Autor: Raphael de Freitas Saldanha
# Agosto de 2008
n <- 200 # Sample size
xbar <- 100 # Sample mean
s <- 2 # Sample SD
nc <- 0.95 # Confidence level (95%
2011 May 15
5
Question on approximations of full logistic regression model
Hi,
I am trying to construct a logistic regression model from my data (104
patients and 25 events). I build a full model consisting of five
predictors with the use of penalization by rms package (lrm, pentrace
etc) because of events per variable issue. Then, I tried to approximate
the full model by step-down technique predicting L from all of the
componet variables using ordinary least squares
2009 Apr 13
3
Clustered data with Design package--bootcov() vs. robcov()
Hi,
I am trying to figure out exactly what the bootcov() function in the Design
package is doing within the context of clustered data. From reading the
documentation/source code it appears that using bootcov() with the cluster
argument constructs standard errors by resampling whole clusters of
observations with replacement rather than resampling individual
observations. Is that right, and is
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
2005 Apr 06
5
bootstrap vs. resampleing
Hi,
I understand bootstrap can be used to estimate 95%
confidence interval for some statistics, e.g.
variance, median, etc. I have someone suggesting that
by resampling certain proportion of the total samples
(e.g. 80%) without replacement, we can also get the
estimate of confidence intervals. Here we have an
example of 1000 obsevations, we would like to estimate
95% confidence intervals for odds
2004 Dec 17
1
Confidence Intervals from Bootstrap Replications
Hi All:
I have to compute bootstrap confidence intervals, the statistic
(incremental cost effectiveness ratio) is computed from two samples
(intervention and control) of different sizes. All the bootstrap
functions that I have seen use one dataset as argument. I may go ahead
and get the desired number of bootstrap replications separately. I would
appreciate if you could point me to a source of a
2011 Mar 27
1
Bootstrap 95% confidence intervals for splines
There appear to be reports in the literature that transform continuous
independent variablea by the use of splines, e.g., assume the dependent
variable is hot dogs eaten per week (HD) and the independent variable is
waistline (WL), a normal linear regression model would be:
nonconfusing_regression <- lm(HD ~ WL)
One might use a spline,
confusion_inducing_regression_with_spline <- lm(HD
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
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
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
2012 Apr 30
3
95% confidence interval of the coefficients from a bootstrap analysis
Hello,
I am doing a simple linear regression analysis that includes few variables.
I am using a bootstrap analysis to obtain the variation of my variables to
replacement.
I am trying to obtain the coefficients 95% confidence interval from the
bootstrap procedure.
Here is my script for the bootstrap:
N = length (data_Pb[,1])
B = 10000
stor.r2 = rep(0,B)
stor.r2 = rep(0,B)
stor.inter =
2006 Jul 11
2
non positive-definite G matrix in mixed models: bootstrap?
Dear list,
In a mixed model I selected I find a non positive definite random effects
variance-covariance matrix G, where some parameters are estimated close to
zero, and related confidence intervals are incredibly large.
Since simplification of the random portion is not an option, for both
interest in the parameters and significant increase in the model fit, I
would like to collect
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 Sep 24
2
help with bootstrap
Hi there,
I'm stuck, but since I just started learning R, this might be a trivial
problem. I need to do a bootstrap on the variance among the eigenvalues
of a matrix. I can get this variance doing this:
>var.eigenvalues=function(x)
>var(eigen(cov(x), symmetric = T, only.values = T)$values)
but if I try to run:
>matrix=read.table("matrix.txt", header=T)
2004 Sep 21
2
Bootstrap ICC estimate with nested data
I would appreciate some thoughts on using the bootstrap functions in the
library "bootstrap" to estimate confidence intervals of ICC values
calculated in lme.
In lme, the ICC is calculated as tau/(tau+sigma-squared). So, for instance
the ICC in the following example is 0.116:
> tmod<-lme(CINISMO~1,random=~1|IDGRUP,data=TDAT)
> VarCorr(tmod)
IDGRUP = pdLogChol(1)
2006 Apr 01
2
small sample size confidence interval by bootstrap
Hi, All:
I only have 4 samples. I wish to get a confidence interval around the mean.
Is it reasonable? If not, is there a way to compute a confidence interval
for such small sample size's mean?
Many thanks,
U
[[alternative HTML version deleted]]
2004 Apr 10
1
confidential interval of correlation coefficient using bootstrap
I tried 2 methods to estimate C.I. of correlation coefficient of variables x and y:
> x <- c(44.4, 45.9, 41.9, 53.3, 44.7, 44.1, 50.7, 45.2, 60.1)
> y <- c( 2.6, 3.1, 2.5, 5.0, 3.6, 4.0, 5.2, 2.8, 3.8)
#METHOD 1: Pearson's
**********************************************************
> cor.test(x, y, method = "pearson", conf.level = 0.95)
Pearson's