文档介绍:1MultileveldataandanalysiswithStata(in15minutes)2GeneralisedlinearmodelY=BX+eY=evariable(s)X=explanatoryvariablese=plexitytotheGLM,suchasbydisaggregatingtheerrorstructures3TheworkofstatisticalmodellingYi=BXi+eiMostofthetime:wehaveasingleYweignoreeweconcentrateonwhatgoesintoB4ExampleData:BritishHouseholdPanelSurvey2005adultinterviews(7kadultsinwork)Y=GHQscalescoreforadultsinemployment(GeneralHealthQuestionnaire,higher=worsesubjectivewell-being)X=variouspossiblemeasures,includinggender,age,maritalstatus,occupationaladvantage,education,partner’sGHQYoucanrunthisexample,thefilesareat:********************Age-squared-**-**-**Cohab-*-**-**-**OwnCAMSIS-*-’--->’**(norelationbetweenerrortermsfordifferentcases)[aboveusing:Menard,,London:Sage.]7MultilevelmodellingWhatiftherewassomeconnectionbetweensomeofthecaseswithinthedataset?,sampleincludesmultiplechildrenfromthesameschoolSomeconnections(‘hierarchicalclusters’)ountforhierarchy/clusteringinindividualdata?:Y=BX+scot+wal+Nir+e‘areg’inStataallowsseveralhundredvariableslikethisoftencalleda‘hierarchicalfixedeffect’‘hierarchicalfixedeffects’Wecouldtrytellingthemodelthatweexpecttheerrortermstoberelatedtheseare‘hierarchicalrandomeffects’=multilevelmodels10CreatingamultilevelmodelLinearmodel: Yi=BXi+