[R] glm stability

2008-09-25 Thread Erwann.Rogard
hi all, i have an iterative algorithm that relies on glm at each step to compute a set of coefficients (gamma). depending on the input to the algorithm, glm may at certain iterations generate crazy values (associated with glm$converge = FALSE). in some cases, start = last value of gamma resolves

[R] Ratio of gammas

2008-08-27 Thread Erwann.Rogard
hello, gamma(a) works fine for a<173, but gamma(173) returns [1] Inf Warning message: value out of range in 'gammafn' What I really need is the ratio gamma(nu/2) / gamma((nu+1)/2) is anyone aware of a way to re-express this in a form that pushes the threshold past which a warning message is ge

[R] par(ask=TRUE)

2008-03-28 Thread Erwann.Rogard
Hi, 1) par(ask=TRUE) histogram(~Y|F1 * F2 * F3,data = ...) Successively displays many plots as the # of levels in F3 w/o asking for input between each. In other words I only get to see the plot for the last level. What's the right commands? 2) Also I am wondering if there are plot objects i.e.

Re: [R] histogram for integer data

2008-03-27 Thread Erwann.Rogard
Thanks! Yes, but I also want to be able to condition easily hence histogram(...), not plot -Original Message- From: Don MacQueen [mailto:[EMAIL PROTECTED] Sent: Thursday, March 27, 2008 3:55 PM To: Rogard, Erwann R&D/US/EXT; r-help@r-project.org Subject: Re: [R] histogram for integer da

[R] histogram for integer data

2008-03-27 Thread Erwann.Rogard
hi, library(lattice) x<-c(-1,-1,-1,0,0,0,0,1,1,2) rng<-range(x) histogram(x,endpoints=c(rng[1]-0.5,rng[2]+0.5),nint=length(unique(x))) instead of contiguous bins, i'd like spaces between them to indicate that the data is discrete, or even better, line segments positioned at integer values. i kn

Re: [R] difference between 2 ecdfs

2008-03-27 Thread Erwann.Rogard
Thanks to David and Zaihra for their help. Besides plotting the difference between 2 ecdfs, I also would like it to *look like* a step function. Any suggestion? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Winsemius Sent: Friday, March 21, 2008 8

[R] difference between 2 ecdfs

2008-03-21 Thread Erwann.Rogard
hi, a) i have something like: ecdfgrp1<-ecdf(subset(mydata,TMT_GRP==1)$Y); ecdfgrp2<-ecdf(subset(mydata,TMT_GRP==2)$Y); how can i plot the difference between these 2 step functions? i could begin with ecdfrefl<-function(x){ecdfgrp2(x)-ecdfgrp1(x);} ... what next? b) if i have a vector wit