Standard errors in AOCTOOL

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

I'm having a problem with aoctool. I'm testing differences in slope for several groups (ie, experiment and controls); each set of measurements are taken at ... comp.soft-sys.matlab Discussion: StandarderrorsinAOCTOOL (toooldtoreply) Tom 2011-07-2523:28:10UTC Permalink I'mhavingaproblemwithaoctool.I'mtestingdifferencesinslopeforseveralgroups(ie,experimentandcontrols);eachsetofmeasurementsaretakenatthesamesettings(dependentvariables).Inotherwords,foreachx-valueIhavethreey-valuesandwanttofitlinestoeachgroup.Inoticethatwhenthisisthecase,thestandarderrors,andthustheconfidenceintervalsinmultcompare,arethesameforeachgroup,eveniftheyshouldnotbe.Forexample,considerthefollowingdummydata:x=-10:10;y1=2*x+6*randn(1,21);y2=4*x+4*randn(1,21);y3=6*x+2*randn(1,21);groups=[1*ones(1,21)2*ones(1,21)3*ones(1,21)];aoctool([xxx],[y1y2y3],groups);Wehavetworegressionswithdefinitelydifferentstandarderrors,butinthecoefficienttable,thestandarderrorofbothslopeandinterceptarethesameforbothgroupsandthe"sameline"regression(Choosethe"SeparateLines"modeltoseethis).Ifyouuselscovtofittothelinesindividually,thestandarderrorsareobviouslydifferent.Iamnotreallyastatsguy,soImaybeunawareofanassumptionmadehere,orperhapsImisunderstandwhatthoseSEsare-Ithoughttheywerethestandarderrorofdifferencebetweenthe'sameslope'fitandtheindividualfits.Ifthex-coordinatesforthetwogroupsaredifferent,theSEsaredifferent,butstillmoresimilarthanIwouldexpect.Forexample:x1r=rand(1,21)*20-10;x2r=rand(1,21)*20-10;x3r=rand(1,21)*20-10;y1r=2*x1r+6*randn(1,21);y2r=4*x2r+4*randn(1,21);y3r=6*x3r+2*randn(1,21);Becauseofthisissue,IcannottrusttheANCOVAresults,orthecomparisonbetweenslopes.Anyideas?Thanks! TomLane 2011-07-2715:00:34UTC Permalink PostbyTomI'mhavingaproblemwithaoctool.I'mtestingdifferencesinslopeforseveralgroups(ie,experimentandcontrols);eachsetofmeasurementsaretakenatthesamesettings(dependentvariables).Inotherwords,foreachx-valueIhavethreey-valuesandwanttofitlinestoeachgroup.Inoticethatwhenthisisthecase,thestandarderrors,andthustheconfidenceintervalsinmultcompare,arethesameforeachgroup,evenif...PostbyTomIfthex-coordinatesforthetwogroupsaredifferent,theSEsareTheaoctoolfunctionimplementstheusualanalysisofcovariancemodel,whichhasanassumptionofequalvariancesacrossgroups.Itsoundslikethat'snotwhatyouwant.Ifyoudidwantthat,theappropriatethingwouldbetocomputeasingleerrorvarianceestimate.Thestandarderrorsarefunctionsofthatvarianceestimateandthexvalues.Ifthexvaluesarethesameacrossgroups,thenthecoefficientstandarderrorswouldbethesameacrossgroupsasyoufound.That'swhataoctooldoes.Ifyouhavesomepriorknowledgeofthevariancesofthedifferentgroups,youcoulddefineweightshasthereciprocalsofthesevariances.Thelscovandglmfitfunctionssupportweights.You'dhavetosetuptheXmatrixtoincludebothyourcurrentxvariableandindicatorvariablesforthecategories.Thedummyvarfunctionmightbeofusethere.Ifyoudon'tknowtheweights,Ibelievepeoplesometimesfitamodel,estimatethevariancesfromtheresiduals,usethesevariancestodefineweights,re-fit,anditerate.I'venevertriedthatmyself.--Tom 1Reply 17Views Permalinktothispage Disableenhancedparsing ThreadNavigation Tom 2011-07-2523:28:10UTC TomLane 2011-07-2715:00:34UTC about-legalese Loading...



請為這篇文章評分?