資源描述:
《the r book analysis of covariance》由會員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在工程資料-天天文庫。
1、12AnalysisofCovarianceAnalysisofcovariance(ANCOVA)combineselementsfromregressionandanalysisofvariance.Theresponsevariableiscontinuous,andthereisatleastonecontinuousexplanatoryvariableandatleastonecategoricalexplanatoryvariable.Theprocedureworkslikethis:Fittwoormorelinearregressi
2、onsofyagainstx(oneforeachlevelofthefactor).Estimatedifferentslopesandinterceptsforeachlevel.Usemodelsimpli?cation(deletiontests)toeliminateunnecessaryparameters.Forexample,wecoulduseANCOVAinamedicalexperimentwheretheresponsevariablewas‘daystorecovery’andtheexplanatoryvariablesw
3、ere‘smokerornot’(categorical)and‘bloodcellcount’(continuous).Ineconomics,localunemploymentratemightbemodelledasafunctionofcountry(categorical)andlocalpopulationsize(continuous).Supposewearemodellingweight(theresponsevariable)asafunctionofsexandage.Sexisafactorwithtwolevels(malean
4、dfemale)andageisacontinuousvariable.Themaximalmodelthereforehasfourparameters:twoslopes(aslopeformalesandaslopeforfemales)andtwointercepts(oneformalesandoneforfemales)likethis:weightmale=amale+bmale×age,weightfemale=afemale+bfemale×age.TheRBook,SecondEdition.MichaelJ.Crawley.?201
5、3JohnWiley&Sons,Ltd.Published2013byJohnWiley&Sons,Ltd.538THERBOOK0.00.40.80.00.40.8WeightWeight0.00.20.40.60.81.00.00.20.40.60.81.0AgeAge0.00.40.80.00.40.8WeightWeight0.00.20.40.60.81.00.00.20.40.60.81.0AgeAge0.00.40.80.00.40.8WeightWeight0.00.20.40.60.81.00.00.20.40.60.81.0AgeAg
6、eThismaximalmodelisshowninthetopleft-handpanel.Modelsimpli?cationisanessentialpartofanalysisofcovariance,becausetheprincipleofparsimonyrequiresthatwekeepasfewparametersinthemodelaspossible.Therearesixpossiblemodelsinthiscase,andtheprocessofmodelsimpli?cationbeginsbyaskingwhetherw
7、eneedallfourparameters(topleft).Perhapswecouldmakedowithtwointerceptsandacommonslope(topright),oracommoninterceptandtwodifferentslopes(centreleft).Thereagain,agemayhavenosigni?canteffectontheresponse,soweonlyneedtwoparameterstodescribethemaineffectsofsexonweight;thiswouldshowupas
8、twoseparated,horizontallinesintheplot(on