logistic regression

Click here to load reader

Post on 24-Feb-2016

131 views

Category:

Documents

0 download

Embed Size (px)

DESCRIPTION

Logistic Regression. Appiled Linear Statistical Models ,由 Neter 等著 Categorical Data Analysis ,由 Agresti 著. Logistic 回归. 当响应变量是定性变量时的非线性模型 两种 可能的结果,成功或失败,患病的或没 有 患病的,出席的或缺席的 实例 : CAD ( 心血管 疾病 ) 是年龄,体重,性别, 吸烟历史 ,血压的函数 吸烟 者或不吸烟者是家庭历史,同年龄组行 为 ,收入,年龄的函数 今年购买一辆汽车是收入,当前汽车的使用 - PowerPoint PPT Presentation

TRANSCRIPT

Logistic Regression

Logistic RegressionAppiled Linear Statistical ModelsNeterCategorical Data AnalysisAgresti

CAD()

Logistic

Logistic

CADLogistic

Logistic

Logistic

,Newton-Raphson,(IRLS)

Logistic

Kyphosis: a factor with levels absent present indicating if a kyphosis (a type of deformation) was present after the operation. Age: in months Number: the number of vertebrae involved Start: the number of the first (topmost) vertebra operated on.

kyphosis {rpart}()81 rows and 4 columnssome(kyphosis) Kyphosis Age Number Start12 absent 148 3 1618 absent 175 5 1332 absent 125 2 1140 present 91 5 1250 absent 177 2 1451 absent 68 5 1052 absent 9 2 1770 absent 15 5 1679 absent 120 2 1381 absent 36 4 13summary(kyphosis) Kyphosis Age Number Start absent :64 Min. : 1.00 Min. : 2.000 Min. : 1.00 present:17 1st Qu.: 26.00 1st Qu.: 3.000 1st Qu.: 9.00 Median : 87.00 Median : 4.000 Median :13.00 Mean : 83.65 Mean : 4.049 Mean :11.49 3rd Qu.:130.00 3rd Qu.: 5.000 3rd Qu.:16.00 Max. :206.00 Max. :10.000 Max. :18.00plot(kyphosis)

boxplot(Age~Kyphosis,data=kyphosis)

vs.

summary(glm(Kyphosis~Age+Number+Start,family=binomial,data=kyphosis))Deviance Residuals: Min 1Q Median 3Q Max -2.3124 -0.5484 -0.3632 -0.1659 2.1613 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -2.036934 1.449575 -1.405 0.15996 Age 0.010930 0.006446 1.696 0.08996 . Number 0.410601 0.224861 1.826 0.06785 . Start -0.206510 0.067699 -3.050 0.00229 **---Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1(Dispersion parameter for binomial family taken to be 1) Null deviance: 83.234 on 80 degrees of freedomResidual deviance: 61.380 on 77 degrees of freedomAIC: 69.38Number of Fisher Scoring iterations: 5

0

x