s-news
[Top] [All Lists]

Regression logistic: comparison obersed/predicited probabilities

To: <s-news@wubios.wustl.edu>
Subject: Regression logistic: comparison obersed/predicited probabilities
From: "GIORGI Roch" <roch.giorgi@mail.ap-hm.fr>
Date: Sun, 23 Oct 2005 16:48:16 +0200
Thread-index: AcXX4M252TrWELMsTW+I62eO30xCrA==
Thread-topic: Regression logistic: comparison obersed/predicited probabilities
Dear all,

I performed regression logistic analysis and I want to test if the observed 
probabilities of the event on a subset of my data are equivalent to the 
expected probabilities using the result of a fit based on another subset of the 
data. 
My code is below but I am not sure of the validity of my method. Does anyone 
could help me? 

Cheers,

Roch

My SPLUS code (I am using SPLUS 6.2 for Windows):
First I fit the model on the validation group (subset=(group==1)):
fit1 <- glm(event ~ x1, subset=(group==1), family=binomial, data=MyData)

Then I obtain the individuals predictions:
exp.proba <- predict(fit1, data.frame(age=MyData$x1), type='response')

I add "exp.proba" to my dataset.
I fit the model on the test group (subset=(group==0)) using logit(exp.proba) on 
the offset:
fit2 <- glm(event ~ 1 + offset(log(exp.proba/(1-exp.proba))),
                        subset=(group==0), family=binomial, data=MyData)
summary(fit2)


_____________________________________________________
  Roch GIORGI, MD, PhD
  Service de Santé Publique et d'Information Médicale
  Hôpital de la Timone
  264, rue St Pierre 
  13385 Marseille cedex 5 
  Tel: +33 (0)491 384 949
  Fax: +33 (0)491 385 749 
  email: roch.giorgi@ap-hm.fr 
  Web: http://cybertim.timone.univ-mrs.fr/


<Prev in Thread] Current Thread [Next in Thread>
  • Regression logistic: comparison obersed/predicited probabilities, GIORGI Roch <=