From p.dalgaard at biostat.ku.dk  Thu Mar 18 22:01:12 2004
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Thu Mar 18 22:02:03 2004
Subject: [Rd] termplot has problems with a single term (fix included)
	(PR#6679)
In-Reply-To: <20040318195342.EDE721045E@slim.kubism.ku.dk>
References: <20040318195342.EDE721045E@slim.kubism.ku.dk>
Message-ID: <x2ptb9zx7r.fsf@biostat.ku.dk>

tlumley@u.washington.edu writes:

> On Thu, 18 Mar 2004 k.hansen@biostat.ku.dk wrote:
> 
> > The bug exists on R-1.9.0-alpha compiled the 10/3.
> >
> > Termplot has a problem if either the model only contains a single term
> > or if asked to plot a single term. In addition there are problems with
> > the option se = TRUE.
> 
> I can't reproduce this in either R-devel or 1.8.1, and termplot hasn't
> changed since January.
> 
> I do
> example(termplot)
...
> without any error messages.  I also note that termplot() doesn't
> (anymore) start with the line you say it starts with, though it did until
> January.
> 
> Could you provide an example?

The original story was this (which I saw but lacked the time to analyze):

library(survival)
library(MASS)
library(splines)
data(Melanoma)
men<-Melanoma[Melanoma$status<3,]
y<-coxph(Surv(time,status) ~ sex + ns(thickness,df=4),data=men)
z<-coxph(Surv(time,status) ~ ns(thickness,df=4),data=men)

termplot(y)         #OK
termplot(z)         # Prints a ? prompt (from parse(text=nmt) w/nmt==NULL)
termplot(y,terms=2) # Same

This can still be seen with the current devel version.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907


[Rd] termplot has problems with a single term (fix included) (PR#6679)
Peter Dalgaard