aoctool - Interactive analysis of covariance - MathWorks

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

aoctool(x,y,group) fits a separate line to the column vectors, x and y , for each group defined by the values in the array group . group may be a ... Skiptocontent HelpCenterHelpCenter SearchHelpCenter HelpCenter MathWorks SearchMathWorks.com MathWorks Support CloseMobileSearch OpenMobileSearch Off-CanvasNavigationMenuToggle DocumentationHomeAI,DataScience,andStatistics StatisticsandMachineLearningToolbox ANOVAAnalysisofVarianceandCovariance aoctool Onthispage SyntaxDescriptionExamplesVersionHistorySeeAlso DocumentationExamplesFunctionsBlocksAppsVideosAnswers TrialSoftware TrialSoftware ProductUpdates ProductUpdates Resources DocumentationExamplesFunctionsBlocksAppsVideosAnswers MainContent aoctoolInteractiveanalysisofcovariance Syntaxaoctool(x,y,group) aoctool(x,y,group,alpha) aoctool(x,y,group,alpha,xname,yname,gname) aoctool(x,y,group,alpha,xname,yname,gname,displayopt) aoctool(x,y,group,alpha,xname,yname,gname,displayopt,model) h=aoctool(...) [h,atab,ctab]=aoctool(...) [h,atab,ctab,stats]=aoctool(...) Descriptionaoctool(x,y,group)fitsaseparatelinetothecolumn vectors,xandy,foreachgroupdefinedbythevalues inthearraygroup.groupmaybeacategoricalvariable, numericvector,characterarray,stringarray,orcellarrayofcharactervectors.Thesetypes ofmodelsareknownasone-wayanalysisofcovariance(ANOCOVA)models.Theoutputconsistsof threefigures:AninteractivegraphofthedataandpredictioncurvesAnANOVAtableAtableofparameterestimatesYoucanusethefigurestochangemodelsandtotestdifferent partsofthemodel.Moreinformationaboutinteractiveuseoftheaoctoolfunction appearsinAnalysisofCovarianceTool.aoctool(x,y,group,alpha) determinestheconfidencelevelsofthepredictionintervals.The confidencelevelis100(1-alpha)%.Thedefault valueofalphais0.05.aoctool(x,y,group,alpha,xname,yname,gname)specifies thenametouseforthex,y,andg variablesinthegraphandtables.Ifyouentersimplevariablenamesforthe x,y,andgarguments,the aoctoolfunctionusesthosenames.Ifyouenteranexpressionforone ofthesearguments,youcanspecifyanametouseinplaceofthatexpressionbysupplying thesearguments.Forexample,ifyouenterm(:,2)asthe xargument,youmightchoosetoenter'Col 2'as thexnameargument.aoctool(x,y,group,alpha,xname,yname,gname,displayopt)enables thegraphandtabledisplayswhendisplayoptis'on'(default) andsuppressesthosedisplayswhendisplayoptis'off'.aoctool(x,y,group,alpha,xname,yname,gname,displayopt,model)specifies theinitialmodeltofit.Thevalueofmodelcan beanyofthefollowing:'samemean'—Fitasingle mean,ignoringgrouping'separatemeans'—Fita separatemeantoeachgroup'sameline'—Fitasingle line,ignoringgrouping'parallellines'—Fita separatelinetoeachgroup,butconstrainthelinestobeparallel'separatelines'—Fita separatelinetoeachgroup,withnoconstraintsh=aoctool(...)returns avectorofhandlestothelineobjectsintheplot.[h,atab,ctab]=aoctool(...)returns cellarrayscontainingtheentriesinANOVAtable(atab) andthetableofcoefficientestimates(ctab). (Youcancopyatextversionofeithertabletotheclipboardbyusing theCopyTextitemontheEditmenu.)[h,atab,ctab,stats]=aoctool(...)returns astatsstructurethatyoucanusetoperforma follow-upmultiplecomparisontest.TheANOVAtableoutputincludes testsofthehypothesesthattheslopesorinterceptsareallthe same,againstageneralalternativethattheyarenotallthesame. Sometimesitispreferabletoperformatesttodeterminewhichpairs ofvaluesaresignificantlydifferent,andwhicharenot.Youcan usethemultcomparefunction toperformsuchtestsbysupplyingthestatsstructure asinput.Youcantesteithertheslopes,theintercepts,orpopulation marginalmeans(theheightsofthecurvesatthemeanxvalue).ExamplesThisexampleillustrateshowtofitdifferentmodelsnon-interactively. Afterloadingthesmallercardatasetandfittingaseparate-slopes model,youcanexaminethecoefficientestimates.loadcarsmall [h,a,c,s]=aoctool(Weight,MPG,Model_Year,0.05,... '','','','off','separatelines'); c(:,1:2) ans= 'Term''Estimate' 'Intercept'[45.97983716833132] '70'[-8.58050531454973] '76'[-3.89017396094922] '82'[12.47067927549897] 'Slope'[-0.00780212907455] '70'[0.00195840368824] '76'[0.00113831038418] '82'[-0.00309671407243]Roughlyspeaking,thelinesrelatingMPGtoWeighthave aninterceptcloseto45.98andaslopecloseto-0.0078.Eachgroup's coefficientsareoffsetfromthesevaluessomewhat.Forinstance, theinterceptforthecarsmadein1970is45.98-8.58=37.40.Next,tryafitusingparallellines.(TheANOVAtableshows thattheparallel-linesfitissignificantlyworsethantheseparate-lines fit.)[h,a,c,s]=aoctool(Weight,MPG,Model_Year,0.05,... '','','','off','parallellines'); c(:,1:2) ans= 'Term''Estimate' 'Intercept'[43.38984085130596] '70'[-3.27948192983761] '76'[-1.35036234809006] '82'[4.62984427792768] 'Slope'[-0.00664751826198]Again,therearedifferentinterceptsforeachgroup,butthis timetheslopesareconstrainedtobethesame.VersionHistoryIntroducedbeforeR2006aSeeAlsoanova1|multcompare|polytool × MATLABCommand YouclickedalinkthatcorrespondstothisMATLABcommand: RunthecommandbyenteringitintheMATLABCommandWindow. WebbrowsersdonotsupportMATLABcommands. Close × SelectaWebSite Chooseawebsitetogettranslatedcontentwhereavailableandseelocaleventsandoffers.Basedonyourlocation,werecommendthatyouselect:. Switzerland(English) Switzerland(Deutsch) Switzerland(Français) 中国(简体中文) 中国(English) Youcanalsoselectawebsitefromthefollowinglist: HowtoGetBestSitePerformance SelecttheChinasite(inChineseorEnglish)forbestsiteperformance.OtherMathWorkscountrysitesarenotoptimizedforvisitsfromyourlocation. 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) 中国 简体中文 English 日本(日本語) 한국(한국어) Contactyourlocaloffice TrialSoftware TrialSoftware ProductUpdates ProductUpdates



請為這篇文章評分?