How can I create an improved version of a method in R, and have it be used?
Short version:
I think plot.histogram has a bug, and I'd like to try a version with a fix.
But when I call hist(), my fixed version doesn't get used.
Long version:
hist() calls plot() which calls plot.histogram() which
:10), graphics)
hist(1:10)
Haley
On Thu, Oct 9, 2014 at 1:14 AM, Tim Hesterberg timhesterb...@gmail.com
wrote:
How can I create an improved version of a method in R, and have it be
used?
Short version:
I think plot.histogram has a bug, and I'd like to try a version with a
fix
of interest on the new table.
}
When f is called with 1:n, the table it creates should be the same
as the original table. When called with a bootstrap sample of
values from 1:n, it should create a table corresponding to the
bootstrap sample.
Tim Hesterberg
http://www.timhesterberg.net
(resampling
Le mercredi 12 septembre 2012 à 07:08 -0700, Tim Hesterberg a écrit :
One approach is to bootstrap the vector 1:n, where n is the number
of individuals, with a function that does:
f - function(vectorOfIndices, theTable) {
(1) create a new table with the same dimensions, but with the counts
bootstrap and jackknife methods won't work right.
Tim Hesterberg
http://www.timhesterberg.net
New: Mathematical Statistics with Resampling and R, Chihara Hesterberg
On Fri, Aug 31, 2012 at 12:15 PM, David L Carlson dcarl...@tamu.edu wrote:
Using a data.frame x with columns bins and counts:
x
* round(a data frame with numeric and factor columns)
rounds the numeric columns and leaves the factor columns unchanged, rather
than failing.
Tim Hesterberg
NEW! Mathematical Statistics with Resampling and R, Chihara Hesterberg
http://www.amazon.com/Mathematical-Statistics-Resampling-Laura
,
The permutation test answers the question - given that there is exactly
1 outlier in my combined data, what is the probability that random chance
would give a difference as large as I observed. The bootstrap would
answer some other question.
Tim Hesterberg
NEW! Mathematical Statistics with Resampling and R
' is not an exported object from 'namespace:boot').
Tim Hesterberg
Do
names(bootObj)
to find out what the components are, and use $ or [[ to extract
components.
Do
help(boot)
for a description of components of the object (look in the Value section).
That is general advice in R, applying to all kinds
(), return lists with
a class added, and you can operate on the object as a list using
names(), $, etc.
Tim Hesterberg
Dear R user,
I used the following to do a bootstrap.
bootObj-boot(data=DAT, statistic=Lp.est,
R=1000,x0=3)
I have the following output from the above bootstrap. How
can I extract
methods have their own biases, particularly in nonlinear
applications such as logistic regression.
Tim Hesterberg
Thank you for your reply, Prof. Harrell.
I agree with you. Dropping only one variable does not actually help a lot.
I have one more question.
During analysis of this model I found
estimated from the original data.
And, you can compute the model matrix once and resample rows of that
along with y, rather than computing a model matrix from scratch each time.
Tim Hesterberg
The only reason the boot package will take more memory for 2000
replications than 10 is that it needs
is the range of the middle 95% of
the recorded differences.
Tim Hesterberg
P.S. I think you're mixing up the response and explanatory variables.
I'd think of eating hot dogs as the cause (explanatory variable),
and waistline as the effect (response, or outcome).
P.P.S. I don't like the terms independent
Can someone help me about detection of outliers using jackknife after
bootstrap algorithm?
A simple procedure is to calculate the mean of the bootstrap
statistics for all bootstrap samples that omit the first of the
original observations. Repeat for the second, third, ... original
observation.
/~timhesterberg/articles/JSM04-bootknife.pdf
All three are undefined for samples of size 1. You need to go to some
other bootstrap, e.g. a parametric bootstrap with variability estimated
from other data.
Tim Hesterberg
__
R-help@r-project.org mailing
, pValueUpper)
Tim Hesterberg
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
I've defined my own version of summary.default,
that gives a better summary for highly skewed vectors.
If I call
summary(x)
the method is used.
If I call
summary(data.frame(x))
the method is not used.
I've traced this to lapply; this uses the new method:
lapply(list(x), function(x)
for inference
(bias, standard error, confidence intervals), not improving on
ThetaHat.
Tim Hesterberg
Hi Doran,
Maybe I am wrong, but I think bootstrap is a general resampling method which
can be used for different purposes...Usually it works well when you do not
have a presentative sample set (maybe
Statistical Association, 2924-2930.
http://home.comcast.net/~timhesterberg/articles/JSM04-bootknife.pdf
Tim Hesterberg
(formerly of Insightful, now Google, and only now catching up on R-help)
Hi Dan,
Thanks for response yes i do know that bootstrap samples generated by
function boot
[u = range(v)[1] u = range(v)[2]]
},
U = u, V = v)
Tim Hesterberg
I want to apply this function to the columns of a data frame:
u[u = range(v)[1] u = range(v)[2]]
where u is the n column data frame under consideration and v is a data frame
of values with the same
in a
rowing boat to find out whether conditions are sufficiently calm for
an ocean liner to leave port. (G.E.P. Box, Non-normality and tests
on variances, Biometrika, 40 (1953), pp 318-335, quote on page 333;
via from Moore McCabe.
Tim Hesterberg
Dear all
I have run t.test(), and get a output
# 3.33
# larger data frame
x - matrix(runif(10^5), 10^3)
x[ runif(10^5) .99 ] - NA
df2 - data.frame(x)
system.time( for(i in 1:100) temp - rowSums(is.na(df2)) 100)
# .34
system.time( for(i in 1:10^4) temp - apply(df,1,function(x)any(!is.na(x
# 3.34
Tim Hesterberg
Thomas Lumley wrote:
On Wed, 6 Feb 2008, Tim Hesterberg wrote:
Tim Hesterberg wrote:
I'll raise a related issue - sampling with unequal probabilities,
without replacement. R does the wrong thing, in my opinion:
...
Peter Dalgaard wrote:
But is that the right thing? ...
(See bottom
(colSums( matrix( wt*f(c(xvalues), ...), 10)
}
Tim Hesterberg
On 22/01/2008 5:30 AM, Thomas Steiner wrote:
I want to use a function as an argument to ingtegrate it twice.
...
Duncan Murdoch wrote:
...
The other problem is that integrate is not vectorized, it can only take
scalar values for lower
that depend only
on y.
The answer to your second question is the same as the first - sample
blocks of observations, keeping x and y together.
Tim Hesterberg
Hello.
I have got two problems in bootstrapping from
dependent data sets.
Given two time-series x and y
I wrote the original rowSums (in S-PLUS).
There, rowSums() does not coerce integer to double.
However, one advantage of coercion is to avoid integer overflow.
Tim Hesterberg
... So, why does rowSums() coerce to double (behaviour
that is undesirable for me
25 matches
Mail list logo