利用逻辑斯回归分析Word格式.docx
- 文档编号:16191246
- 上传时间:2022-11-21
- 格式:DOCX
- 页数:8
- 大小:24.99KB
利用逻辑斯回归分析Word格式.docx
《利用逻辑斯回归分析Word格式.docx》由会员分享,可在线阅读,更多相关《利用逻辑斯回归分析Word格式.docx(8页珍藏版)》请在冰豆网上搜索。
c,nci,,,xiikin,,,,e1,,i,,,,=,,,L,,,,,,,,,,,,xx,,,,iic1e1e,,,,,1i,i,,,
,,找出使得以上之機率為最大。
B:
WeightedLSE(leastsquareestimator)
cciin,,
(1)np(1,p)c之Var(c)=用來估計iiiixxiinnii
1給予權數:
加權數,加重數:
。
Varci
第12週講義(12-2)
BinaryResponsewithseveralexplanatoryvariables:
1,:
theresponseofthindividual,binaryresponsei,YY,ii0,
p–dimvectorofcovariateXX,(X,X,...,X)ii1i2ipi~~
P,P(Y,1|X)iii~
LogisticRegressionmodel
,,logitP,,X,...,X011iippi
PlogitP,log1,P
,,,,...,XX011ippiei.e.P,i,,,,...,,XX011ippi1,e
,logitP(Y,1|X,r,1),logitP(Y,1|X,r)iiiii
P(Y,1|X,r,1)/P(Y,0|X,r,1)iiii,lnP(Y,1|X,r)/P(Y,0|X,r)iiii
logoddsratiocorrespondingtoaunitchangeinpredictorwhenallotherareX,Xjii
holdconstants.
,,2,G:
H:
,...,,0(model0)p012,,,
logitP,,X,...,Xiippi1011
maxLikelihoodLH00LR,,,,2logLR,,2(logL,logL),,2logL,2logLmm00maxLikelihoodLm,,22G,,2ln(LR)~p
故其值其值,以表示所選擇變數之相關重要性
,,2,D:
(deviance)H:
logitP,,X,...,Xpp0011
saturatedmodel(models)1
2logLR,,2logL,2logLsm
22,D,,2ln(LR)~,,np1
故其值其值,表示fit好
22G,D,2logL,2logLs0
H:
logitP,,0022,,G,D,constant,之,2ln(LR),H:
saturated1,
第12週講義(12-3)
LogisticRegressionwithOneContinuousCovariate
TheSASSystem程式:
TheLOGISTICProcedureoptionsnodatenonotes;
DataSet:
WORK.P261datap261;
ResponseVariable(Events):
CResponseProfileinputloadnc;
r=c/n;
ResponseVariable(Trials):
NOrderedBinarycards;
NumberofObservations:
10ValueOutcomeCount25005010LinkFunction:
Logit1EVENT33727007017
2NOEVENT353290010030ModelFittingInformationandTesting31006021
GlobalNullHypothesisBETA=033004018Intercept35008543
Interceptand37009054CriterionOnlyCovariatesChi-SquareforCovariates39005033AIC958.172847.712.41008060SC962.709856.785.43006551
-2LOGL956.172843.712112.460with1DF(p=0.0001);
Score..107.066with1DF(p=0.0001)proclogistic;
modelc/n=load;
AnalysisofMaximumLikelihoodEstimatesoutputout=a
ParameterStandardWaldPr>
pred=pred;
VariableDFEstimateErrorChi-SquareChi-Squarerun;
INTERCPT1-5.33970.545795.75000.0001..procprint;
LOAD10.001550.00015896.60850.0001run;
OddsRatioEstimates
Point95%Wald
EffectEstimateConfidenceLimits
load1.0021.0011.002
AssociationofPredictedProbabilitiesandObservedResponses
PercentConcordant68.0Somers'
D0.452
PercentDiscordant22.9Gamma0.497
PercentTied9.1Tau-a0.226
Pairs118961c0.726
Concordant=68.0%Somers'
D=0.452
Discordant=22.9%Gamma=0.497
Tied=9.1%Tau-a=0.226
(118961pairs)c=0.726
OBSLOADNCRPRED
1250050100.200000.18715
2270070170.242860.23886
32900100300.300000.29959
4310060210.350000.36829
5330040180.450000.44278
6350085430.505880.51994
7370090540.600000.59616
8390050330.660000.66801
9410080600.750000.73280
10430065510.784620.78894
第12週講義(12-4)
LogisticRegressionwithMixedCovariate
Datacrab;
inputcolorspinewidthsatellweight;
ifsatell>
0theny=1;
ifsatell=0theny=0;
n=1;
weight=weight/1000;
color=color-1;
cards;
3328.383050
4322.501550
2126.092300
.
..
5327.002625
3224.502000
;
procgenmod;
classcolor;
modely/n=colorwidth/dist=binlink=logit;
proclogistic;
modely=colorweightwidth/selection=backward;
run;
PARTOFOUTPUT:
TheGENMODProcedure
ModelInformation
DataSetWORK.CRAB
DistributionBinomial
LinkFunctionLogit
ResponseVariable(Events)y
ResponseVariable(Trials)n
ObservationsUsed173
NumberOfEvents111
NumberOfTrials173
ClassLevelInformation
ClassLevelsValues
color41234
CriteriaForAssessingGoodnessOfFit
CriterionDFValueValue/DF
Deviance168187.45701.1158
ScaledDeviance168187.45701.1158
PearsonChi-Square168168.65901.0039
ScaledPearsonX2168168.65901.0039
LogLikelihood-93.7285
Algorithmconverged.
AnalysisOfParameterEstimates
StandardWald95%ConfidenceChi-ParameterDFEstimateErrorLimitsSquarePr>
ChiSq
Intercept1-12.71512.7618-18.1281-7.302121.20<
.0001
color111.32990.8525-0.34103.00082.430.1188
color211.40230.54840.32742.47736.540.0106
color311.10610.5921-0.05432.26663.490.0617
color400.00000.00000.00000.0000..width10.46800.10550.26110.674819.66<
Scale01.00000.00001.00001.0000NOTE:
Thescaleparameterwasheldfixed.
第12週講義(12-5)
TheLOGISTICProcedure
ResponseVariabley
NumberofResponseLevels2
NumberofObservations173
Modelbinarylogit
OptimizationTechniqueFisher'
sscoring
ResponseProfile
OrderedTotal
ValueyFrequency
1062
21111
Probabilitymodeledisy=0.
BackwardEliminationProcedure
Step0.Thefollowingeffectswereentered:
Interceptcolorweightwidth
ModelConvergenceStatus
Convergencecriterion(GCONV=1E-8)satisfied.
ModelFitStatistics
Intercept
Interceptand
CriterionOnlyCovariates
AIC227.759195.925
SC230.912208.538
-2LogL225.759187.925
TestingGlobalNullHypothesis:
BETA=0
TestChi-SquareDFPr>
LikelihoodRatio37.83363<
Score33.38873<
Wald27.88553<
第12週講義(12-6)
Step1.Effectweightisremoved:
AIC227.759195.121
SC230.912204.581
-2LogL225.759189.121
LikelihoodRatio36.63732<
Score32.73582<
Wald27.06092<
ResidualChi-SquareTest
Chi-SquareDFPr>
1.203110.2727
NOTE:
No(additional)effectsmetthe0.05significancelevelforremovalfromthemodel.
SummaryofBackwardElimination
EffectNumberWald
StepRemovedDFInChi-SquarePr>
1weight121.17780.2778
AnalysisofMaximumLikelihoodEstimates
StandardWald
ParameterDFEstimateErrorChi-SquarePr>
Intercept110.07082.806912.87330.0003
color10.50900.22375.17910.0229
width1-0.45830.104019.4129<
color1.6641.0732.579
width0.6320.5160.775
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 利用 逻辑 回归 分析