stepwise的model history 数据怎么导出

发布网友 发布时间:2022-04-25 16:26

我来回答

1个回答

热心网友 时间:2023-10-17 11:27

函数名是REGRESS,逐步回归:stepwiseB=REGRESS(Y,X)returnsthevectorBofregressioncoefficientsinthelinearmodelY=X*B.Xisann-by-pdesignmatrix,withrowscorrespondingtoobservationsandcolumnstopredictorvariables.Yisann-by-1vectorofresponseobservations.[B,BINT]=REGRESS(Y,X)returnsamatrixBINTof95%confidenceintervalsforB.[B,BINT,R]=REGRESS(Y,X)returnsavectorRofresials.[B,BINT,R,RINT]=REGRESS(Y,X)returnsamatrixRINTofintervalsthatcanbeusedtodiagnoseoutliers.IfRINT(i,:)doesnotcontainzero,thenthei-thresialislargerthanwouldbeexpected,atthe5%significancelevel.ThisisevidencethattheI-thobservationisanoutlier.[B,BINT,R,RINT,STATS]=REGRESS(Y,X)returnsavectorSTATScontaining,inthefollowingorder,theR-squarestatistic,theFstatisticandpvalueforthefullmodel,andanestimateoftheerrorvariance.[]=REGRESS(Y,X,ALPHA)usesa100*(1-ALPHA)%confidenceleveltocomputeBINT,anda(100*ALPHA)%significanceleveltocomputeRINT.Xshouldincludeacolumnofonessothatthemodelcontainsaconstantterm.TheFstatisticandpvaluearecomputendertheassumptionthatthemodelcontainsaconstantterm,andtheyarenotcorrectformodelswithoutaconstant.TheR-squarevalueisoneminustheratiooftheerrorsumofsquarestothetotalsumofsquares.Thisvaluecanbenegativeformodelswithoutaconstant,whichindicatesthatthemodelisnotappropriateforthedata.IfcolumnsofXarelinearlydependent,REGRESSsetsthemaximumpossiblenumberofelementsofBtozerotoobtaina"basicsolution",andreturnszerosinelementsofBINTcorrespondingtothezeroelementsofB.REGRESStreatsNaNsinXorYasmissingvalues,andremovesthem.Seealsolscov,polyfit,regstats,robustfit,stepwise.

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com