Displaying 20 results from an estimated 4000 matches similar to: "boot and variances of the bootstrap replicates of the variable of interest?"
2018 May 22
0
Bootstrap and average median squared error
Hello,
If you want to bootstrap a statistic, I suggest you use base package boot.
You would need the data in a data.frame, see how you could do it.
library(boot)
bootMedianSE <- function(data, indices){
d <- data[indices, ]
fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d)
ypred <- predict(fit)
y <- d$crp
median(y - ypred)^2
}
dat <-
2011 Feb 23
0
parallel bootstrap linear model on multicore mac
People of R(th),
I have been ramming my head against this problem, and I wondered if
anyone could lend a hand. I want to parallelize a bootstrap of a linear
model on my 8-core mac. Below is the process that I want to parallelize
(namely, the m2.ph.rlm.boot<-boot(m2.ph,m2.ph.fun, R = nboot) command).
This is an extension of the bootstrapping linear models example in
Venables and Ripley to
2018 May 22
2
Bootstrap and average median squared error
I forgot, you should also set.seed() before calling boot() to make the
results reproducible.
Rui Barradas
On 5/22/2018 10:00 AM, Rui Barradas wrote:
> Hello,
>
> If you want to bootstrap a statistic, I suggest you use base package boot.
> You would need the data in a data.frame, see how you could do it.
>
>
> library(boot)
>
> bootMedianSE <- function(data,
2011 Feb 24
1
parallel bootstrap linear model on multicore mac (re-post)
Hello all,
I am re-posting my previous question with a simpler, more transparent,
commented code.
I have been ramming my head against this problem, and I wondered if
anyone could lend a hand. I want to make parallel a bootstrap of a
linear mixed model on my 8-core mac. Below is the process that I want to
make parallel (namely, the boot.out<-boot(dat.res,boot.fun, R = nboot)
command).
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
2012 Jan 19
1
snow - bootstrapped correlation ranking
I wonder if someone could help me adjusting the following code to parallelized snow code:
#Creating a data set (not needed to be parallel)
n<-100
p<-100
x<-matrix(rnorm(n*p),p)
y<-rnorm(n)
# Bootstrapping
nboot<-1000
alpha<-0.05
rhoboot <- array(0, dim=c(p,nboot))
bootranks <- array(0, dim=c(p,nboot))
bootsamples <- array( floor(runif(n*nboot)*n+1), dim=c(n,nboot))
for
2001 Aug 05
2
Just out of interest whats this?
FIXME:pthread_rwlock_rdlock
FIXME:pthread_rwlock_unlock
what's this, what's causing it and what needs fixing (I'll give it a
look if it's needed) or is it just an old error that dosn't really need
fixing (I can run almost everything I want to and the all show this
error) just intersted
Rob
2007 Jun 14
0
How to get a point estimate from the studentized bootstrap?
Dear Friends and Colleagues,
I'm puzzling over how to interpret or use some bootstrap intervals. I
think that I know what I should do, but I want to check with
knowledgeable people first!
I'm using a studentized non-parametric bootstrap to estimate 95%
confidence intervals for three parameters. I estimate the variance of
the bootstrap replicates using another bootstrap. The script
2010 Jul 20
1
p-values pvclust maximum distance measure
Hi,
I am new to clustering and was wondering why pvclust using "maximum"
as distance measure nearly always results in p-values above 95%.
I wrote an example programme which demonstrates this effect. I
uploaded a PDF showing the results
Here is the code which produces the PDF file:
-------------------------------------------------------------------------------------
s <-
2008 Dec 03
1
help on tapply using sample with differing sample-sizes
Hello, My question likely got buried so I am reposting it in the hopes that someone has an answer. I have thought more about the question and modified my question. I hope tha
my specific question is:
I am attempting to create a bootstrap procedure for a finite sample using the theory of Rao and Wu, JASA (1988) that replicates within each strata (h) n_h - 1 times. To this end, I require a
2011 May 16
1
Matrix manipulation in for loop
Hi all,
I have a problem with getting my code to do what I want!
This is the code I have:
create.means.one.size<-function(nsample,var,nboot){
mat.x<-matrix(0,nrow=nboot,ncol=nsample)
for(i in 1:nboot){
mat.x[i,]<-sample(var,nsample,replace=T)
}
mean.mat<-rep(0,nboot)
for(i in 1:nboot){
mean.mat[i]<-mean(mat.x[i,])
}
sd.mean<-sd(mean.mat)
return(mean.mat)
}
where
2006 Oct 23
1
Lmer, heteroscedasticity and permutation, need help please
Hi everybody,
I'm trying to analyse a set of data with a non-normal response, 2 fixed
effects and 1 nested random effect with strong heteroscedasticity in the
model.
I planned to use the function lmer : lmer(resp~var1*var2 + (1|rand)) and
then use permutations based on the t-statistic given by lmer to get
p-values.
1/ Is it a correct way to obtain p-values for my variables ? (see below)
2003 Aug 04
0
Feedback Bootstrapping
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
2007 Nov 01
1
loops & sampling
Hi,
I'm new to R (and statistics) and my boss has thrown me in the deep-end with the following task:
We want to evaluate the impact that sampling size has on our ability to create a robust model, or evaluate how robust the model is to sample size for the purpose of cross-validation i.e. in our current project we have collected a series of independent data at 250 locations, from which
2004 Mar 12
0
Basic questions on nls and bootstrap
Dear R community,
I have currently some problems with non linear regression analysis in R.
My data correspond to the degradation kinetic of a pollutant in two
different soil A and B, x data are time in day and y data are pollutant
concentration in soil.
In a first time, I want to fit the data for the soil A by using the Ct =
C0*exp(-k*Tpst) with Ct the concentration of pollutant at time t, C0
2011 Apr 03
2
:HELP
Hello,
I want to sum first three terms of each column of matrix.
But I don't calculate with "apply" function.
skwkrt<-function(N=10000,mu=0,sigma=1,n=100,
nboot=1000,alpha=0.05){
x<-rnorm(N,mu,sigma)#population
samplex<-matrix(sample(x,n*nboot,replace=T),nrow=nboot)
#...
}
is that: suppose a is a 5x2 matrix.
a={1,2,3,4,5
2001 Nov 29
0
ltsreg warnings (PR#1184)
Full_Name: Charles J. Geyer
Version: 1.3.1
OS: linux-gnu-i686
Submission from: (NULL) (134.84.86.22)
ltsreg gives incomprehensible (to me) warnings
A homework problem for nonparametrics
########## start example ##########
library(bootstrap)
data(cell)
names(cell)
attach(cell)
library(lqs)
plot(V1, V2)
fred <- ltsreg(V2 ~ V1 + I(V1^2))
curve(predict(fred, data.frame(V1 = x)), add = TRUE)
2006 Jul 06
0
pvclust Error:NA/NaN/Inf in foreign function call (arg 11)
Hi all,
I'm new to R and I'm struggling to decipher an error message. Briefly, I am trying to use the pvclust package to do hierarchical clustering of some CGH data. The data is from the Progenetix CGH database. It is arranged as a table where each column is a single case and each row is a single chromosome band. The value in each cell is either 0, 1, 2, or -1. Corresponding to no change,
2005 Jun 23
1
errorest
Hi,
I am using errorest function from ipred package.
I am hoping to perform "bootstrap 0.632+" and "bootstrap leave one out".
According to the manual page for errorest, i use the following command:
ce632[i]<-errorest(ytrain ~., data=mydata, model=lda,
estimator=c("boot","632plus"), predict=mypredict.lda)$error
It didn't work. I then tried the
2012 Oct 08
0
Mininum number of resamples required to do BCa bootstrap?
I'm using R 2.15.1 on a 64-bit machine with Windows 7 Home Premium
and package 'boot'.
I've found that using a number of bootstrap resamples in boot() that
is less than the number of data results in a fatal error. Once the
number of resamples meets or exceeds the number of data, the error disappears.
Sample problem (screwy subscripted syntax is a relic of edited down a
more