欢迎来到天天文库
浏览记录
ID:10272331
大小:147.50 KB
页数:13页
时间:2018-06-14
《logistic回归及sas程序(很全哦)》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、使用条件:n应变量Y是一个二值变量,取值为0和1n自变量X1,X2,……,Xm。nP表示在m个自变量作用下事件发生的概率。图像:程序:dataceshi;inputx1-x18y;cards;……;proclogisticdes;modely=x1-x18/selection=stepwise;run;例:三种药物drug取值0-2,病情程度degree分重-轻两类(0-1);因变量response为治疗效果的效与无效(1-0)Dataex12_1;Inputdrugdegreeresponsecount;Datalines;0113
2、80106400110000821119511018101501003521188210262013420037;Proclogisticdata=ex12_1descending;Freqcount;Classdrug/param=refdescending;Modelresponse=drugdegree/rsqscale=naggregate;Run;Rsq显示R2Scale,SCALE=specifiesmethodtocorrectoverdispersion,指定参数,=n表示不需要修正。Aggregate计算卡方检验统计量
3、Class语句将分类变量化成虚拟变量,三种药用两个虚拟变量表示。TheLOGISTICProcedureModelInformationDataSetWORK.EX12_1ResponseVariableresponseNumberofResponseLevels2FrequencyVariablecountModelbinarylogitOptimizationTechniqueFisher'sscoringNumberofObservationsRead12NumberofObservationsUsed12SumofFreque
4、nciesRead577SumofFrequenciesUsed577ResponseProfileOrderedTotalValueresponseFrequency1131520262Probabilitymodeledisresponse=1.ClassLevelInformationDesignClassValueVariablesdrug210101000ModelConvergenceStatusConvergencecriterion(GCONV=1E-8)satisfied.DevianceandPearsonGood
5、ness-of-FitStatisticsCriterionValueDFValue/DFPr>ChiSqDeviance0.374920.18740.8291Pearson0.368920.18440.8316模型拟合集优度检验,Numberofuniqueprofiles:6ModelFitStatisticsInterceptInterceptandCriterionOnlyCovariatesAIC797.017641.326SC801.375658.757-2LogL795.017633.326R-Square0.2444M
6、ax-rescaledR-Square0.3268TheLOGISTICProcedureTestingGlobalNullHypothesis:BETA=0TestChi-SquareDFPr>ChiSqLikelihoodRatio161.69073<.0001Score148.15983<.0001Wald118.13943<.0001检验模型全部系数为0,拒绝则模型有意义Type3AnalysisofEffectsWaldEffectDFChi-SquarePr>ChiSqdrug295.0859<.0001degree147
7、.4607<.0001AnalysisofMaximumLikelihoodEstimatesStandardWaldParameterDFEstimateErrorChi-SquarePr>ChiSqIntercept1-1.95940.222977.2441<.0001drug211.83420.240658.0936<.0001drug112.28500.247984.9472<.0001degree11.38060.200447.4607<.0001参数估计与检验OddsRatioEstimatesPoint95%WaldEf
8、fectEstimateConfidenceLimitsdrug2vs06.2603.90610.033drug1vs09.8266.04415.974degree3.9772.6855.891Associationof
此文档下载收益归作者所有