Presentation is loading. Please wait.

Presentation is loading. Please wait.

5.2 Inference for logistic regression

Similar presentations


Presentation on theme: "5.2 Inference for logistic regression"— Presentation transcript:

1 5.2 Inference for logistic regression
By Wald’s (1943) asymptotic results for ML estimators, parameter estimators in logistic regression models have large-sample normal distributions. Inference can use Wald, likelihood-ratio and score methods

2 5.2.1 Types of inference

3

4 Confidence intervals

5

6

7

8

9

10

11

12 SAS code /*group data into 8 groups*/ data table4_3a; set table4_3;
W_g=round(W-0.75)+0.75; if W<23.25 then W_g=22.5; if W>29.25 then W_g=30.5; run; proc sql; create table table4_3g as select W_g, count(W_g) as n, sum(NSa) as y, mean(W) as width, sum(Sa) as satell from table4_3a group by W_g; quit; data table4_3g; set table4_3g; logcases=log(n); data table4_3; input C S W Wt NSa=(Sa>0); W1=W ; WW=W1*W1; cards; …

13

14

15

16

17 /*with quadratic item (W-mean)^2 */
proc genmod data=table4_3 desc; model NSa=w1 ww/dist=bin link=logit; run;

18

19

20

21 SAS output/dataset – Table4_3g

22 proc genmod data=table4_3g; model y/n = width / dist = bin link = logit lrci alpha = .01 type3; proc logistic data=table4_3g; model y/n = width / influence stb; output out = predict p = pi_hat lower = LCL upper = UCL; data predict; set predict; rate=y/n; std=sqrt(rate*(1-rate)/n); Lrate=rate-1.96*std; Urate=rate+1.96*std; run; proc print data = predict;

23 symbol1 i=join line=1 color=green value=circle; symbol2 i=join line=1 color=green value=none; symbol3 i=join line=1 color=green value=none; symbol4 i=join line=1 color=blue value=circle; symbol5 i=join line=1 color=blue value=none; symbol6 i=join line=1 color=blue value=none; proc gplot data=predict; plot rate*width Lrate*width Urate*width pi_hat*width LCL*width UCL*width /overlay; Run;

24

25 /. log linear model with grouped data
/*log linear model with grouped data*/ proc genmod data=table4_3g; model satell = width / dist = poi link = log offset = logcases residuals; run;


Download ppt "5.2 Inference for logistic regression"

Similar presentations


Ads by Google