Skip to content

identify() and postscript output

2 messages · Michael Friendly, David Winsemius

#
In the following, I'm fitting a logistic regression model, and using 
car:::influencePlot.  When I run the latter with
output to the screen, it calls identify() that lets me label 
observations with large CookD.

However, if I use postscript() to get .eps output, identify() seems not 
to be called at all.  If instead, I
use dev.copy2eps() after getting output to the screen, the point labels 
do not appear in the resulting .eps
graph.  Why?  Is there a workaround?

library(vcd)
data(Arthritis)
# define Better
Arthritis$Better <- Arthritis$Improved > 'None'
arth.mod1 <- glm(Better ~ Age + Sex + Treatment , data=Arthritis, 
family='binomial')
library(car)
# influence plot
#postscript(file="arthritis-diag2.eps", paper="special", height=6, 
width=6, onefile=TRUE, horizontal=FALSE)
influencePlot(arth.mod1, main="Arthritis data: influencePlot")
#dev.off()

-Michael
#
From the help page:
"Details
identify is a generic function, and only the default method is  
described here.

identify is only supported on screen devices such as X11, windows and  
quartz. On other devices the call will do nothing."

Why not collect the specifics of the identified points and then replot  
to your chosen output device perhaps with a different color or a text  
label? identify should return a value that can be used for that  
purpose. The help page provides an example that should be modifiable  
for that purpose.