Hello,
My question is about the different ways to weight observation with proc logistic. Are those 4 ways equivalent ?
- proc logistic WEIGHT option
- proc logistic FERQ option
- proc logistic EVENTS/TRAILS = type model
- proc logistic on a data base wher all observations appears as often as necessary in the database to simulate the wanted weight.
At first glimpse, it seems that the obtained model is the same in the 4 cases (at least, in the tested example below).
However, the statistics of rank correlation (like Sommer's D) are not the same when we use the WEIGHT option than the 3 other ways.
WEIGHT however is more easy to use as non-integer figures can be used.
=> Does someone have some knowledge on the difference and advantages of the 4 presented ways ? Do they always give the same results (execpt for rank correlation) ?
Here is a SAS example :
DATA TABLE_trials;
input Y X trials events ;
datalines;
1 1.9 1 1
1 1.4 10 10
0 .8 10 0
0 .7 1 0
1 1.3 1 1
0 .6 1 0
1 1 1 1
0 1.9 1 0
0 .8 1 0
0 .5 1 0
;
DATA TABLE_nb (DROP = i trials events);
SET TABLE_trials ;
do i = 1 TO trials ; output ; end ;
run ;
/*1*/ proc logistic DATA=TABLE_trials ; model Y = X ; weight trials ;
/*2*/ proc logistic DATA=TABLE_trials ; model Y = X ; freq trials ;
/*3*/ proc logistic DATA=TABLE_trials ; model events/trials = X ;
/*4*/ proc logistic DATA=TABLE_nb ; model Y = X ; run;