Skip to content

termplot has problems with a single term (fix included) (PR#6679)

2 messages · Thomas Lumley, Peter Dalgaard

#
On Thu, 18 Mar 2004 k.hansen@biostat.ku.dk wrote:

            
I can't reproduce this in either R-devel or 1.8.1, and termplot hasn't
changed since January.

I do
example(termplot)
termplot(model, terms="z")
termplot(model, terms="z", se=TRUE)
termplot(model, terms=1)
termplot(model, terms="ns(x, 6)")
termplot(model, terms="ns(x, 6)", se=TRUE)
termplot(model, terms=2)

mm<-glm(y~x)
termplot(mm)
termplot(mm,se=TRUE)
mm<-glm(y~x-1)
termplot(mm)
termplot(mm,se=TRUE)

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?

	-thomas
Thomas Lumley			Assoc. Professor, Biostatistics
tlumley@u.washington.edu	University of Washington, Seattle
#
tlumley@u.washington.edu writes:
...
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.