# [S] Summary: GUI subset, log.regression prediction

Falk Huettmann (k9wk@unb.ca)
Sat, 13 Jun 1998 12:12:56 +0000

Hello,

Thanks for everybody who replied on my two questions (Stephen Smith,
Ann York, John Thaden and others):

1. Subsetting in graph GUI:
Just write a logical statement in the GUI
Subsetting Window, e.g. Kyphosis=="present"

>From a comand line:
group == A to plot only group A
or
xyplot(y~x, data = data.frame,subset=present==1)
or
xyplot(y~x|present,data=data.frame). Gives two plots of y vs x, for
the two cases of present==0 and present==1

2. Log.regression prediction:

names(kyphosis)
[1] "Kyphosis" "Age" "Number" "Start"

kyphosis\$Kyphosis[1:10]
[1] absent absent present absent absent
absent absent absent absent present

To find out what present and absent are:
as.numeric(kyphosis\$Kyphosis[1:10])
[1] 1 1 2 1 1 1 1 1 1 2

I thought it would be 0 and 1, but compared with above we see
that presence =2 and absence=1 !!

The fitted prediction plot on the lower left panel of Fig. 8.2 SPLUS
Stats p. 200 is done with:

plot(kyph.glm.all\$fitted.values,kyph.glm.all\$y)

and shows values between 0 and 1

So,

kyph.glm.all\$y has the information.

Since entries are in the same order as the data was originally given
then it can be found that present=1, as below:

kyphosis\$Kyphosis[1:10]
[1] absent absent present absent absent absent absent absent
absent present

> kyph.glm.all\$y[1:10]
[1] 0 0 1 0 0 0 0 0 0 1

Thus, using presence (=2) and absence (=1) leads in the predicted
results to 1=present and 0=absent.

In order to evaluate this quicker, I would find it helpful to have
the full log. formular for the log.regression model printed somewhere
(how to get this one?), instead of seeing the intercept and
co-efficients only.

Thanks and best regards

Falk

Falk Huettmann
University of New Brunswick (UNB)
ACWERN / Fac.Forestry
PO Box 44555
Fredericton,N.B.