similar to: single-pass algorithm for quantile calculation

Displaying 20 results from an estimated 4000 matches similar to: "single-pass algorithm for quantile calculation"

2004 Sep 24
1
algorithm reference for sample()
Hi, Don't know if it belongs to r-devel or r-help, but since I am planning to alter some of R's internal code I am sending it here. The existing implementation of the sample() function, when the optional 'prob' argument is given, is quite inefficient. The complexity is O(sampleSize * universeSize), see ProbSampleReplace() and ProbSampleNoReplace() in random.c. This makes the
2011 Dec 30
2
Joint modelling of survival data
Assume that we collect below data : - subjects = 20 males + 20 females, every single individual is independence, and difference events = 1, 2, 3... n covariates = 4 blood types A, B, AB, O http://r.789695.n4.nabble.com/file/n4245397/CodeCogsEqn.jpeg ?m = hazards rates for male ?n = hazards rates for female Wm = Wn x ?, frailty for males, where ? is the edge ratio of male compare to female Wn =
2004 Sep 24
1
algorithm reference for sample() - Knuth
Thank you for the reference to Knuth. Indeed in vol. 2 he has a > -----Original Message----- > From: Tony Plate [mailto:tplate@blackmesacapital.com] > Sent: Friday, September 24, 2004 8:05 AM > To: Vadim Ogranovich > Subject: Re: [Rd] algorithm reference for sample() > > Have you tried looking in Knuth's books on computer > algorithms? (They are classics for good
2003 Jul 17
3
Looking to maximize a conditional likelihood
I want to maximize a conditional likelihood function that is basically logistic conditional on the number of successes within strata. What would be a good starting place for this? A complication is that the denominator includes a term that is the sum over all permutations. Although there is no time dimension to the problem, it's possible a degenerate use of the Cox proportional hazards
2001 Nov 23
4
SQL implementations (was: Are you experienced in SAS and R ...)
An embedded message was scrubbed... From: Douglas Bates <bates at stat.wisc.edu> Subject: Re: [R] Are you experienced in SAS and R as well? Which of these would you recommend me? Date: 23 Nov 2001 15:16:59 -0600 Size: 4446 Url: https://stat.ethz.ch/pipermail/r-help/attachments/20011123/8d0399f0/attachment.mht
2000 Mar 31
2
linear models
Dear R users, I have a couple of linear model related questions. 1) How do I produce a fixed effect linear model using lme? I saw somewhere (this may be Splus documentation since I use Splus and R interchangeably) that using lme(...,random= ~ -1 | groups,...) works, but it gives the same as lme(...,random= ~ 1 | groups,...), ie. fits a random effect intercept term. The reason why I want to do
2005 Jan 26
2
Butterflies in mdct.c
In mdct.c there's some functions including some-point butterfly. In 32-point and 16-point there are calling of smaller-point function everytime twice on each half of data. When I looked on it I found that's just linear algebra. So it can be rewritten to matrix multiplication. Some one can say: there's optimization on in register working. But imagine there's one calling 32-point,
2011 Jul 19
1
notation question
Dear list, I am currently writing up some of my R models in a more formal sense for a paper, and I am having trouble with the notation. Although this isn't really an 'R' question, it should help me to understand a bit better what I am actually doing when fitting my models! Using the analysis of co-variance example from MASS (fourth edition, p 142), what is the correct notation for the
2006 Oct 27
2
Multivariate regression
Hi, Suppose I have a multivariate response Y (n x k) obtained at a set of predictors X (n x p). I would like to perform a linear regression taking into consideration the covariance structure of Y within each unit - this would be represented by a specified matrix V (k x k), assumed to be the same across units. How do I use "lm" to do this? One approach that I was thinking of
2009 Feb 26
2
[LLVMdev] Impressive performance result for LLVM: complex arithmetic
Following a discussion about numerical performance on comp.lang.functional recently I just tried running a simple C mandelbrot benchmark that uses C99's complex arithmetic using gcc and llvm-gcc on a 2.1GHz Opteron 2352 running Debian: gcc: 5.727s llvm-gcc: 1.393s There is still 20% room for improvement but LLVM is >4x faster than gcc here. Sweet. Here's the code: #include
2003 Sep 03
3
read.table: check.names arg - feature request
Hi, I thought it would be convenient if the check.names argument to read.table, which currently can only be TRUE/FALSE, could take a function value as well. If the function is supplied it should be used instead of the default make.names. Here is an example where it can come in handy. I tend to keep my data in coma-separated files with a header line. The header line is prefixed with a comment
2001 Nov 26
3
Doing things with POSIXt
Dear R-Users, I have a data file with timestamps and I wanted to use POSIXct time data type to represent the respective column. I played around with the type and found a couple of issues: * there seems to be no direct way of reading datetimes into a variable. Let's say this is my file "1992-02-27 23:03:20 PST" "1992-02-27 22:29:56 PST" "1992-01-14 01:03:30 PST"
2005 Mar 28
1
mixed model question
I am trying to fit a linear mixed model of the form y_ij = X_ij \beta + delta_i + e_ij where e_ij ~N(0,s^2_ij) with s_ij known and delta_i~N(0,tau^2) I looked at the ecme routine in package:pan, but this routine does not allow for different Vi (variance covariance matrix of the e_i vector) matrices for each cluster. Is there an easy way to fit this model in R or should I bite the bullet and
2008 Aug 14
1
AMI and extensions.conf
Hello I'm looking for a wayy to modify extensions.conf It seems that PutConfig AMI command is not supposed to work on extensionsq.conf Any ideas? Thanks Vadim
2014 Sep 26
3
[LLVMdev] [lldb-dev] RFC: LLVM should require a working C++11 <thread>, <mutex>, and <atomic>
When LLVM's configure finds a usable <pthread.h>, it prefers to use that rather than the home-grown stuff. However if LLVM is configured with --disable-pthreads, both mingw flavors produce the same results. BTW, I've tried to quantify the slowdown: a quick test indicates that LLVM build that uses pthreads is about 10% slower than the one which doesn't. This is less that I
2003 Feb 19
4
fitting a curve according to a custom loss function
Dear R-Users, I need to find a smooth function f() and coefficients a_i that give the best fit to y ~ a_0 + a_1*f(x_1) + a_2*f(x_2) Note that it is the same non-linear transformation f() that is applied to both x_1 and x_2. So my first question is how can I do it in R? A more general question is this: suppose I have a utility function U(a_i, f()), where f() is say a spline. Is there a general
2008 Nov 26
3
distro recommedation
Hi guys, what distribution do you recommend, if you want to run producive systems on it. i got a cluster with two sles10sp2 nodes - but i''m not that satisfied. The migration of my windows-systems are not working in an acceptable way and the pv-drivers for win of suse are not a speed boost at all. Well I could spend big money for Xen Enterprise or VirtualIron - but - do I really have to
2004 May 01
5
skip lines on a connection
Hi, I am looking for an efficient way of skipping big chunks of lines on a connection (not necessarily at the beginning of the file). One way is to use read lines, e.g. readLines(1e6), but a) this incurs the overhead of construction of the return char vector and b) has a (fairly remote) potential to blow up the memory. Another way would be to use scan(), e.g. scan(con, skip=1e6, nmax=0)
2005 Mar 08
4
how modify object in parent.env
Hi, Is it possible to modify an object in the parent.env (as opposed to re-bind)? Here is what I tried: > x = 1:3 # try to modify the first element of x from within a new environment > local(get("x", parent.env(environment()))[1] <- NA) Error in eval(expr, envir, enclos) : Target of assignment expands to non-language object # On the other hand retrieval works just fine >
2010 Oct 20
1
Adding Legend about two quantile lines at ggplot
Hi, all. I'd like to add legend on my graph but I can't. My code is follows. library(ggplot2) score1<-rnorm(100,0,5) score2<-rnorm(400,10,15) mydata<-data.frame(score1,score2) ggplot(mydata,aes(y=score2,x=score1))+geom_point()+stat_quantile(quantiles=c(0.50),col="red")+stat_quantile(quantiles=c(0.90),col="blue",size=2) I like to add legend indicating the