Re: [Rd] efficiency of sample() with prob.

2005-08-30 Thread Bo Peng
> You chose to report just one extremely favourable example, < ignore> > I do think you are being `careless with the truth'. I chose to report whatever I got and whatever I felt the result was. It was not a scientific report and it was up to you (the R-team) to validate my result and make further

Re: [Rd] efficiency of sample() with prob.

2005-08-29 Thread Bo Peng
> It seems the distribution used for your tests is maximally favourable to > your proposal (not uncommon in papers, but not very honest). I did not have time to do a thorough test. I was simply reporting what I had done so any implied dishonesty is unfair to me. > Changing how this is done wil

Re: [Rd] efficiency of sample() with prob.

2005-08-29 Thread Prof Brian Ripley
Peter Windridge and I investigated this further. It seems the distribution used for your tests is maximally favourable to your proposal (not uncommon in papers, but not very honest). There are examples in which the existing method is substantially faster than Walker's (when each set of prob i

Re: [Rd] efficiency of sample() with prob.

2005-06-24 Thread Martin Maechler
> "Bo" == Bo Peng <[EMAIL PROTECTED]> > on Fri, 24 Jun 2005 10:32:45 -0500 writes: Bo> On 6/24/05, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: >> `Research' involves looking at all the competitor methods, devising a >> near-optimal strategy and selecting amongst methods ac

Re: [Rd] efficiency of sample() with prob.

2005-06-24 Thread Bo Peng
On 6/24/05, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > `Research' involves looking at all the competitor methods, devising a > near-optimal strategy and selecting amongst methods according to that > strategy. It is not a quick fix we are looking for but something that > will be good for the lo

Re: [Rd] efficiency of sample() with prob.

2005-06-23 Thread Prof Brian Ripley
`Research' involves looking at all the competitor methods, devising a near-optimal strategy and selecting amongst methods according to that strategy. It is not a quick fix we are looking for but something that will be good for the long term. On Thu, 23 Jun 2005, Bo Peng wrote: >> We suggest th

Re: [Rd] efficiency of sample() with prob.

2005-06-23 Thread Bo Peng
> We suggest that you take up your own suggestion, research this area and > offer the R project the results of your research for consideration as your > contribution. I implemented Walker's alias method and re-compiled R. Here is what I did: 1. replace function ProcSampleReplace in R-2.1.0/src/ma

Re: [Rd] efficiency of sample() with prob.

2005-06-22 Thread Prof Brian Ripley
You might recall the message R is a collaborative project with many contributors. We suggest that you take up your own suggestion, research this area and offer the R project the results of your research for consideration as your contribution. It seems likely that in sample(x, size, replac

Re: [Rd] efficiency of sample() with prob.

2005-06-22 Thread Bo Peng
On 6/21/05, Vadim Ogranovich <[EMAIL PROTECTED]> wrote: > In his "Introduction to Probability Models" Sheldon Ross describes (sec > 11.4.1, 8th edition) the alias method for such weighted sampling. > It is based on some decomposition of the original distribution (the > weights) into a mixture of tw

Re: [Rd] efficiency of sample() with prob.

2005-06-21 Thread Vadim Ogranovich
nal Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Bo Peng > Sent: Tuesday, June 21, 2005 9:24 AM > To: r-devel@r-project.org > Subject: [Rd] efficiency of sample() with prob. > > Dear list, > > A while ago, Vadim asked opinions on improvin

[Rd] efficiency of sample() with prob.

2005-06-21 Thread Bo Peng
Dear list, A while ago, Vadim asked opinions on improving efficiency of sample() with prob, e.g. sample with replacement with weight. ( https://stat.ethz.ch/pipermail/r-devel/2004-September/030844.html ) He did not post what he ended up with this problem though. I am having exactly the same prob