Displaying 20 results from an estimated 200000 matches similar to: "Bootstrap pvalues"
2011 Oct 14
3
Split a list
I have a list of dataframes i.e. each list element is a dataframe with three columns and differing number of rows. The third column takes on only two values. I wish to split the list into two sublists based on the value of the third column of the list element.
Second issue with lists as well. I would like to reduce each of the sublist based on the range of the second column, i.e. if the range of
2011 Nov 15
5
Convert back to lower triangular matrix
Given a vector;> ab = seq(0.5,1, by=0.1)> ab[1] 0.5 0.6 0.7 0.8 0.9 1.0
The euclidean distance between the vector elements is given by the lower triangular matrix > dd1 = dist(ab,"euclidean")> dd1 1 2 3 4 52 0.1 3 0.2 0.1 4 0.3 0.2 0.1 5 0.4 0.3 0.2 0.1 6 0.5 0.4 0.3 0.2 0.1
Convert the lower triangular matrix to a full
2010 Feb 25
2
Rearranging entries in a matrix
I have a matrix, called data. I used the code below to rearrange the data such that the first column remains the same, but the y value falls under either columns 2, 3 or 4, depending on the value of z. If z=1 for example, then the value of y will fall under column 2, if z=2, the value of y falls under column 3, and so on.
data
x y z
[1,] 50 13 1
[2,] 14 8 2
[3,] 3 7 3
[4,] 4 16 1
[5,] 6
2010 Feb 28
4
Reducing a matrix
I wish to rearrange the matrix, df, such that all there are not repeated x values. Particularly, for each value of x that is reated, the corresponded y value should fall under the appropriate column. For example, the x value 3 appears 4 times under the different columns of y, i.e. y1,y2,y3,y4. The output should be such that for the lone value of 3 selected for x, the corresponding row entries
2007 Nov 06
0
Bootstrap CI of Slope in a Weighted Simple Linear Regression
Greetings,
I would like to use the "boot" function to generate a bootstrap confidence
interval for the slope in a SLR that has a zero intercept. My attempt to do
this is shown below. Is this the correct implementation of the boot function
to solve this problem? In particular, should I be doing anything with the
residuals in the "bs" function (e.g., using weighted residuals)?
2012 Jan 23
1
Moving-Tiles Bootstrap
I wish to perform moving tiles bootstrap resampling on some gridded data
meteorological data. I've many years experience with S-Plus, but it has
no way to perform a moving-tiles bootstrap. Within R I've learned how to
use quadratresample() with the spatstats package and would be happy to
simply use empirical percentiles if generating the replicates were fast,
but it isn't. So,
2009 Jan 22
0
detecting the source of memory consumption (example provided)
I have read in a file (call it myData). The actual file is about
3000x30,000 columns and object.size() says myData takes:
> 737910472/(1024^2)
[1] 703.7263
Unfortunately, my program ends up using 40GB as indicated by maxvmem
on Unix, which causes my department's cluster to stop working.
Perhaps, I have some copying going on that I cannot find. I have
created an example below that mimics
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 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,
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 <-
2010 Mar 12
2
Handling repeated values differently
mat is a matrix with X and Y values.
> mat
X Y
[1,] 56 20
[2,] 56 21
[3,] 2 50
[4,] 3 46
[5,] 18 77
[6,] 57 12
[7,] 57 36
[8,] 95 45
[9,] 65 23
[10,] 33 25
[11,] 33 98
[12,] 63 96
[13,] 66 75
[14,] 99 54
[15,] 78 65
[16,] 75 69
[17,] 54 68
[18,] 54 67
[19,] 0 22
[20,] 14 74
[21,] 15 52
[22,] 46 10
[23,] 6 20
[24,] 6 30
As you can see, some of the X values repeat. I wish
2010 Nov 09
1
Bootstrap confidence intervals using bootcov from the rms package
Hello,
I am using R.12.2.0. I am trying to generate bootstrap confidence intervals
using bootcov from the rms package. I am able to impute the missing data
using aregImpute and to perform a linear regression on the imputed datasets
using fit.mult.impute, but I am unable to use bootcov to generate the
confidence intervals for the R-squared. Here is a small example that should
duplicate the
2003 Dec 18
1
bootstrap pValue in DClusters
Hello R-List
I use DClusters package (I work in a cancer regestry). I have 2 questions
about it:
1-how is it possible to get back the bootstrap pValue? I mean the pValue of
the calculated statistic with respect of the distribution of this statistic
under the null hypothesis.
2-how is it possible to test an overdispersion in the poisson model? for
choosing a best model I need this mesure of
2007 Mar 12
0
Pvalues and lme
Dear R users,
I have developed a model
I have compared several options of obtaining p-values for
poisson lmer model including Marlov chain monty carlo methods, single
term deletions and summary.
>
> However, I encountered several problems that can be classified as
> (1) the p values from the summary command are total different from
those derived from Marlov chain monty carlo methods
>
2011 Feb 16
1
using the bootstrap method for latent class analysis
Hi
I was wondering whether anyone can provide any help or suggestions on the
boostrap method for latent class analysis please.
My main question is: can the bootstrap procedure sometimes be less precise
than the non-bootstrap procedure when carrying out latent class analysis?
I am asking this question because I carried out some analyses and when I *did
not* use the bootstrap procedure I found
2004 Apr 09
1
bootstrap function coefficients
Dear R community,
Please, can you help me with a problem concerning bootstrap. The data table
called «RMika», contained times (Tps) and corresponding concentration of a
chemical in a soil (SolA). I would like to get, by bootstraping, 10
estimations of the parameters C0 and k from the function: SolA =
C0*exp(-k*Tps).
# First, I fit the data and all is OK
>
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 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
2012 Aug 07
1
how to write out a tree file with bootstrap from phangorn package
Dear R-helpers and Klaus,
I would like to know how to write out a tree file with bootstrap from
phangorn package. That tree file could be in newick format or others.
I am new for phylogenetic operation in R. Could you please give me any
directions on that? Thanks in advance.
Best wishes,
Jian-Feng,
########
# as a example
# I accomplished 1000 bootstrap simulation on a fit object (a maximum
2012 Dec 06
1
bootstrap based confidence band
I'm trying to find a bootstrap based confidence band for a linear model.
I have created a data set with X and Y
X=runif(n,-1.25,1.25)
e=rnorm(n,0,1)
Y=exp(3*X)+5*sin((30*X)/(2*pi))+2*e
fit=lm(Y~X)
summary(fit)
I define a bootstrap function named PairedBootstrap which is not listed here. Than I try many ways to find the confidence band. One way is to predict Y using the model I get above for