Re: [R] complex contrasts and logistic regression

2007-06-25 Thread Nicholas Lewin-Koh
) Would be effectively testing for a trend in odds ratios? Do I have to fiddle with contrasts to make sure I am testing the correct parameter? Thanks Nicholas On Sat, 16 Jun 2007 11:14:12 -0500, Frank E Harrell Jr [EMAIL PROTECTED] said: Nicholas Lewin-Koh wrote: Hi, I am doing a retrospective

[R] complex contrasts and logistic regression

2007-06-15 Thread Nicholas Lewin-Koh
Hi, I am doing a retrospective analysis on a cohort from a designed trial, and I am fitting the model fit-glmD(survived ~ Covariate*Therapy + confounder,myDat,X=TRUE, Y=TRUE, family=binomial()) My covariate has three levels (A,B and C) and therapy has two (treated and control), confounder is a

[R] R vs. Splus in Pharma/Devices Industry

2007-06-15 Thread Nicholas Lewin-Koh
Hi, I just saw this thread. This issue, and the larger scale issue of open source in industry is being addressed. One has to realize that the behemoth that is the clinical aperatus of the pharma industry is very conservative and very slow to change. In many cases switching to R would meean

[R] clustering: Multivariate t mixtures

2005-09-08 Thread Nicholas Lewin-Koh
Hi, Before I write code to do it does anyone know of code for fitting mixtures of multivariate-t distributions. I can't use McLachan's EMMIX code because the license is For non commercial use only. I checked, mclust and flexmix but both only do Gaussian. Thanks Nicholas

Re: [R] clustering: Multivariate t mixtures

2005-09-08 Thread Nicholas Lewin-Koh
Hi, Actually that was my plan was to implement a new flexmix class. Thanks for the pointer to the jss paper, that will be helpful. Nicholas On Thu, 8 Sep 2005 23:07:13 +0200, Achim Zeileis [EMAIL PROTECTED] said: On Thu, 08 Sep 2005 15:38:55 -0500 Nicholas Lewin-Koh wrote: Hi, Before I

[R] tcltk, X11 protocol error: Bug?

2005-09-05 Thread Nicholas Lewin-Koh
Hi, I am having trouble debugging this one. The code is attached below, but it seems to be a problem at the C-tk interface. If I run this 1 time there are no problems if I run it more than once I start to get warnings that increase in multiples of 11 everytime I run it. Here is a sample session

[R] Correct variance for prediction intervals from nlme and gnls objects

2005-07-22 Thread Nicholas Lewin-Koh
, Douglas Bates [EMAIL PROTECTED] said: On 7/19/05, Nicholas Lewin-Koh [EMAIL PROTECTED] wrote: Hello, I am writing a set of functions to do prediction and calibration intervals for at least the subset of selfstarting models if not some more general ones. I need to be able to extract

[R] Matrix: Help with syntax and comparison with SparseM

2004-06-25 Thread Nicholas Lewin-Koh
Hi, I am writing some basic smoothers in R for cleaning some spectral data. I wanted to see if I could get close to matlab for speed, so I was trying to compare SparseM with Matrix to see which could do the choleski decomposition the fastest. Here is the function using SparseM difsm - function(y,

[R] RSPerl: getting test.pl to run

2004-06-14 Thread Nicholas Lewin-Koh
Hi, I am trying to install and get RSPerl running so that we can use it locally in some of our scripts. I have followed the directions in the documentation and fixed some of the problems I found in the archives like the bootstrap problem. I am using R 1.9.0 and RSPerl 0.5-7 Here is the problem:

[R] RE: Kernel Density Estimator for 2D Binned Data

2004-02-12 Thread Nicholas Lewin-Koh
Hi James, You can try the hexbin package at www.bioconductor.org. Do the following bin-hexbin(x,y) ## This will give you hexagonal bins of the data binsm-smooth.hexbin(bin) plot(binsm) This is an approximation to what you want. The other way is to use a 2d bspline on the bin center of masses of

[R] RE: Savitzky-Golay smoothing -- an R implementation

2004-02-10 Thread Nicholas Lewin-Koh
. difsm - function(y, lambda, d){ # Smoothing with a finite difference penalty # y: signal to be smoothed # lambda: smoothing parameter # d: order of differences in penalty (generally 2) # Paul Eilers, 2002, ported from matlab by Nicholas Lewin-Koh require(SparseM) m - length(y) E

[R] Memory explosion, plotting nmle grouped data object

2003-07-24 Thread Nicholas Lewin-Koh
Hi I am using R 1.7.1 on RH linux 9.0 sum(unlist(lapply(ls(),function(x)object.size(get(x)/1024^2 [1] 2.424263 so I am not using much memory (I have a gig of ram on my machine) now in nlme gtest-groupedData(log(X8)~Time|sub,all[,c(names(all)[1:9],X8)],outer=~A*B) object.size(gtest)/1024

[R] Re: [Rd]Comparing fp numbers, was Bug in %in% (match)

2003-04-06 Thread Nicholas Lewin-Koh
wrote: Nicholas Lewin-Koh [EMAIL PROTECTED] writes: Hi, Am I hitting some limit in match? Consider the following example: tst-seq(100,125,by=.2)%in%seq(0,800,by=.1) sum(tst) [1] 76 Gives the correct answer. Did I miss something? The fact that 1/5 and 1/10 are not represented

[R] Re: [Rd]Comparing fp numbers, was Bug in %in% (match)

2003-04-06 Thread Nicholas Lewin-Koh
of the two types in R's ordering, logical integer numeric complex character) before matching. Nicholas On Mon, 2003-04-07 at 11:10, Nicholas Lewin-Koh wrote: Hi, Thanks, I should have thought of that. If I do tst-(10*seq(100,125,by=.2))%in%(10*seq(0,800,by=.1)) sum(tst) [1] 122