How to calculate StdErr for intercepts and slopes ... - MathWorks

文章推薦指數: 80 %
投票人數:10人

Learn more about ancova, anovan, analysis of covariance, multivariate ancova MATLAB, Statistics and Machine Learning Toolbox. Skiptocontent MATLABAnswers ToggleSubNavigation SearchAnswers ClearFilters Answers Support MathWorks SearchSupport ClearFilters Support Answers MathWorks SearchMathWorks.com ClearFilters MathWorks Answers Support CloseMobileSearch CloseMobileSearch MATLABCentral CommunityHome MATLABAnswers FileExchange Cody Blogs Communities TreasureHunt Highlights Contests Advisors VirtualBadges About HomeAskAnswerBrowseMoreMATLABFAQsContributorsRecentActivityFlaggedContentManageSpamHelp MATLABCentral CommunityHome MATLABAnswers FileExchange Cody Blogs Communities TreasureHunt Highlights Contests Advisors VirtualBadges About HomeAskAnswerBrowseMoreMATLABFAQsContributorsRecentActivityFlaggedContentManageSpamHelp Trialsoftware Youarenowfollowingthisquestion Youwillseeupdatesinyourfollowedcontentfeed. Youmayreceiveemails,dependingonyourcommunicationpreferences. HowtocalculateStdErrforinterceptsandslopesinamultivariateANCOVA(functionANOVAN()withcontinuousindependentvariable)? Follow 11views(last30days) Showoldercomments AlexSabrekov on4Jan2022 Vote0 Link × Directlinktothisquestion https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c Cancel CopytoClipboard  ⋮  Vote0 Link × Directlinktothisquestion https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c Cancel CopytoClipboard Commented:AlexSabrekov on7Jan2022 AcceptedAnswer:JeffMiller Iamtryingtodomultivariateanalysisofcovariance(mANCOVA)withMatlab.ThereisaspecialGUIforitcalledaoctool(),butitworksonlyforonecategorialindependentvariable(CIV)andonecovariate.SoifIhavetwoCIVsand/ortwocovariates,Ineedsomethingelse.Fortunately,anovan()tool,initiallymadeforn-wayANOVA,coulddealwithcontinuosindependentvariables.SoitispossibletoperformmANCOVAusingthistoolanditreallyworks!Onecanmakeandtestshypothesisonvarianceofslopesandtreatments,buttoprovideacomperehensiveanalysisoneneedstocompareindividualmodels(slopesorintercepts)tofinddifferenesbetweenthem.Butstatsstructureinanovan()outputscontainsonlyvaluesofmodelcoefficients(stats.coeffs)butnottheirStdErr,SSEetc.Soonecannottesthypothesisonequalityoftwoslopes(usingt-test).Strictlyspeaking,therearenomultcompare()forslopesinmANCOVA.Cansomebodygivemeanadvice(orjustanyhelp),howIcanborrowdataonslopesStdErrorSSEfromanovan()withcontinuousindependentvariable?Thanks,Alex.   0Comments ShowHide&nbsp-1oldercomments Signintocomment. Signintoanswerthisquestion. Ihavethesamequestion(0) Ihavethesamequestion(0) AcceptedAnswer JeffMiller on5Jan2022 Vote2 Link × Directlinktothisanswer https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#answer_868155 Cancel CopytoClipboard  ⋮  Vote2 Link × Directlinktothisanswer https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#answer_868155 Cancel CopytoClipboard Helpful(2) Helpful(2) Ifyousetupdummyvariablestocodeyourcategoricalindependentvariables,youcanthendoanalysisofcovariancewithfitlm.Theadvanceofthatisthatyoucanthenuseregressiontechniquestogetstandarderrorsandconfidenceintervalsforthemodelcoefficients.Maybethereisaneasierway,though.   5Comments ShowHide&nbsp4oldercomments AlexSabrekov on5Jan2022 × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1919425 Cancel CopytoClipboard  ⋮  Link × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1919425 Cancel CopytoClipboard Thanks,Jeff!Itriedanditworks!Usingbothanovan()andfitlm()givespossibilitytomakecomperehensivemANCOVA.Buttherearesomeissues(probablysomebodywillbeinterested):fitlm()withcategorialvariablesasaIVbydefaultusesonevalueofthisIVasareference.Soyoukindoflosethisvaluefromanalysis.Itcouldbefixedwithdummyvariables,andinthiscaseverylongmodelformulationsshouldbemade:mdl1=fitlm(data1,'y~-1+OO:a+OO:b+OO:c+RO:a+RO:b+RO:c+WP:a+WP:b+WP:c+BW:a+BW:b+BW:c+x:OO+x:RO+x:WP+x:BW')whenyouspecifyfullmodelincludinginterceptandcategoricalvariableswithoutinteraction(inmycaseOO,RO,a,bandsoon)Matlabiscomplainingonrankdeficiency.Soonlyrestrictedmodelabovewithinteractionbutwithoutinterceptandsinglecategoricalvariablesdidnotreportrankdeficiency.Resultsarestillok(IcomparewithSAScalculationfromMillikenandJohnson)butIamnervousaboutthisreportsandtheirpossibleinfluenceonfutureresults.ButanywaynowIcandopairwisecomparisonsforslopes.Numberofdegreesoffreedomremainsunclear,lookslikeitshouldnotbesizesofsubsampleforthisparticularslopes,buttotalsamplesizeminusparameters-inmycase72vs72andnot18vs18.MultiplecomparisonofslopesisstillproblematicbecauseitneedscustomizedBonferroni-typecorrectionbutsimplecorrectionusingHolmmethodcouldbemade. JeffMiller on5Jan2022 × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1920520 Cancel CopytoClipboard  ⋮  Link × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1920520 Cancel CopytoClipboard Youarewelcome,Alex.Justacommentaboutrankdeficiencythatmayberelevant:Therearevariouswaystosetupdummyvariablesforcodingcategoricalvariables(andthereinteractions),andsomeoftheseproducerank-deficientdesignmatricesevenifyouleaveofftheconstantterm(asyouhavedonewithyour-1terminthemodel)--especiallyifyouhavemultiplecategoricalvariables.Ifyouareinterested,acodingmethodthatavoidsrankdeficiencyproblemsisdescribedinthisonlinebook(withlotsofexamples). AlexSabrekov on6Jan2022 × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1921225 Cancel CopytoClipboard  ⋮  Link × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1921225 Cancel CopytoClipboard Thankyouverymuchagain,Jeff!Iamwondering,howMatlabwoulddealwithothertypesofintroducingdummyvariables.InMatlabinfactthisissystemof0and1,not+1/0/-1notation.FormeitismoreconvenienttostayinsideMatlabframework.DoyousuggestoptimalcodingmethodinChapter18?AsIsee,Millikenusesn-wayANOVAwith3typeofvariancetotesttheoverallstructureofthemodel,andthenusesDVRmodellingtotestslopesandestimatemodels.Sopossiblerankdeficiencyisnotcriticalformaindecisionsatleast. JeffMiller on7Jan2022 × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1922710 Cancel CopytoClipboard  ⋮  Link × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1922710 Cancel CopytoClipboard HiAlex,No,Idon'trecommendthatyouchangecodingmethodsifyouhaveonethatgivesyouwhatyouneed.Ijustthoughttheothercodingmethodmightbehelpfulifrankdeficiencywasblockingyou. AlexSabrekov on7Jan2022 × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1923240 Cancel CopytoClipboard  ⋮  Link × Directlinktothiscomment https://www.mathworks.com/matlabcentral/answers/1622190-how-to-calculate-stderr-for-intercepts-and-slopes-in-a-multivariate-ancova-function-anovan-with-c#comment_1923240 Cancel CopytoClipboard AsIunderstand,thisrankdeficiencyisauniversalandobligatepropertyofcertainlinearmodelformulations,anditdoesn'treallyinfluenceonslopeestimates.Thanksagainfortheideaofdummyvariables!Ihaveheardwithhalfanearaboutit,butthoughtthatitistoocomplicatedforme.ButnowIrealizethatthisistheonlywaytosolvetheseproblemsproperly.Usingfitlm()alsogivesoneanabilitytoestimatemodelwithacertainconfidenceinterval,thatisnecesarryforresult'sreporting.Sothereisnoneedtosearchanewtrickysoftware. Signintocomment. MoreAnswers(0) Signintoanswerthisquestion. SeeAlso Categories AI,DataScience,andStatistics StatisticsandMachineLearningToolbox ANOVA AnalysisofVarianceandCovariance Tags ancovaanovananalysisofcovariancemultivariateancova Products MATLABStatisticsandMachineLearningToolbox Release R2016b CommunityTreasureHunt FindthetreasuresinMATLABCentralanddiscoverhowthecommunitycanhelpyou! StartHunting! AnErrorOccurred Unabletocompletetheactionbecauseofchangesmadetothepage.Reloadthepagetoseeitsupdatedstate. Close × SelectaWeb Site Chooseawebsitetogettranslatedcontentwhereavailableandseelocaleventsand offers.Basedon yourlocation,werecommendthatyouselect:. Switzerland(English) Switzerland(Deutsch) Switzerland(Français) 中国(简体中文) 中国(English) Youcanalsoselectawebsitefromthefollowinglist: HowtoGetBestSitePerformance SelecttheChinasite(inChineseorEnglish)forbestsiteperformance.OtherMathWorkscountry sitesarenotoptimizedforvisitsfromyourlocation. Americas AméricaLatina(Español) Canada(English) UnitedStates(English) Europe Belgium(English) Denmark(English) Deutschland(Deutsch) España(Español) Finland(English) France(Français) Ireland(English) Italia(Italiano) Luxembourg(English) Netherlands(English) Norway(English) Österreich(Deutsch) Portugal(English) Sweden(English) Switzerland Deutsch English Français UnitedKingdom (English) AsiaPacific Australia(English) India(English) NewZealand(English) 中国 简体中文Chinese English 日本Japanese(日本語) 한국Korean(한국어) Contactyourlocaloffice Trialsoftware



請為這篇文章評分?