Download presentation
Presentation is loading. Please wait.
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
4
Confidence intervals
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; …
17
/*with quadratic item (W-mean)^2 */
proc genmod data=table4_3 desc; model NSa=w1 ww/dist=bin link=logit; run;
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;
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;
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.