marginist
Hi,
I got confused about when we should include the weight statement in the two procedures for a binomial response.
From the SAS help document example for Proc logistic, it doesn't use the weight statement for the events/trials "model" specification.
But under GLM framework, "For the binomial distribution, the response is the binomial proportion Y = events/ trials (y=r/n). VAR(Y) = u*(1-u)/n. The variance function is v(u) = u*(1-u), and the binomial trials parameter n is regarded as a weight w." This means that we should use the trials (n) as the weight. This makes sense since variance of the response varies by n (number of trials).
But if I use the "weight" statement in the procedure, the parameter estimates are quite different.
proc logistic data=ingots;
model r/n=Heat Soak;
weigth n;
run;
Could someone please help me explain this? Whether or when should I use weight for binomial response?
Thanks a lot!
Original example from SAS help document.
-------------------------------
data ingots;
input Heat Soak r n @@;
datalines;
7 1.0 0 10 14 1.0 0 31 27 1.0 1 56 51 1.0 3 13
7 1.7 0 17 14 1.7 0 43 27 1.7 4 44 51 1.7 0 1
7 2.2 0 7 14 2.2 2 33 27 2.2 0 21 51 2.2 0 1
7 2.8 0 12 14 2.8 0 31 27 2.8 1 22 51 4.0 0 1
7 4.0 0 9 14 4.0 0 19 27 4.0 1 16
;
proc logistic data=ingots;
model r/n=Heat Soak;
run;
-------------------------------