s-news
[Top] [All Lists]

[S] Different output in splus 2000 from V&R

To: SPLUS-Discussion list <s-news@wubios.wustl.edu>
Subject: [S] Different output in splus 2000 from V&R
From: Eran Bellin <belliney@idt.net>
Date: Thu, 21 Oct 1999 12:38:09 -0400
Sender: owner-s-news@wubios.wustl.edu
I am having trouble recreating an analysis using the standard
hosmer-lemeshow dataset cited in V&R 3rd edition.

P.222 Venables and Ripley

Relevant section of the analysis:

> options(constrasts=c("contr.treatment","contr.poly"))

> race<-factor(RACE,labels=c("white","black","other"))



> table(race,as.numeric(race))
       1  2  3
white 96  0  0
black  0 26  0
other  0  0 67
> ftv<-factor(FTV)

> levels(ftv)[-(1:2)]<-"2+"
> table(ftv)
   0  1 2+
 100 47 42
>
bbwt<-data.frame(low=factor(LOW),AGE,LWT,race,smoke=(SMOKE>0),ptd,ht=HT>0,ui=(UI>0),ftv)

> birthwt.glm<-glm(low~.,family=binomial,data=bbwt)
> summary(birthwt.glm,corr=F)

Call: glm(formula = low ~ AGE + LWT + race + smoke + ptd + ht + ui +
ftv, family = binomial, data =
 bbwt
 )
Deviance Residuals:
       Min         1Q     Median        3Q      Max
 -1.703806 -0.8067671 -0.5008365 0.8835519 2.215185

Coefficients:
                  Value  Std. Error    t value
(Intercept)  3.72790660 1.344892247  2.7718998
        AGE -0.03723398 0.038677748 -0.9626718
        LWT -0.01565297 0.007075944 -2.2121383
      race1  0.59620460 0.267872879  2.2256998
      race2  0.04815882 0.144406014  0.3334960
      smoke  0.37776250 0.212382233  1.7786916
        ptd  0.67188041 0.240222259  2.7969115
         ht  0.95658085 0.360217203  2.6555668
         ui  0.34009734 0.232107790  1.4652560
       ftv1 -0.21818928 0.239580527 -0.9107138
       ftv2  0.13239878 0.148931932  0.8889885

(Dispersion Parameter for Binomial family taken to be 1 )

    Null Deviance: 234.672 on 188 degrees of freedom

Residual Deviance: 195.4755 on 178 degrees of freedom

Number of Fisher Scoring Iterations: 4

Note:  race2 and ftv2 Are not the same as the results in the Venables
and Ripley book.  The value of the coefficients given by Venables and
Ripley P. 223 third edition are .7406 and .179007 respectively.

I am assuming that race1 is comparing race=2 to race=1 and that race2 is
comparing race=3 to race=1.

For those who do not have the dataset, I would be happy to forward.

Is there some change in the coding of splus 2000?

Sincerely,
Eran Bellin

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>