分層模型分析與應用五講ghlm_第1頁
分層模型分析與應用五講ghlm_第2頁
分層模型分析與應用五講ghlm_第3頁
分層模型分析與應用五講ghlm_第4頁
分層模型分析與應用五講ghlm_第5頁
已閱讀5頁,還剩87頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領

文檔簡介

第五一第五一般化線性分層模型ld模型采用的結果變量可用離散變量不同測量層次結果的影響分析成為主流潛在變量已被植入分層模型分層模型的貝葉斯推斷廣泛普及和應用HLM只描述連續(xù)型分布的層HLM只描述連續(xù)型分布的層-1結果基于模型誤差的正態(tài)分布統(tǒng)計推斷可在正態(tài)分布理論范圍內(nèi)進行若結果變量屬于離散型變量,推斷則更為復雜若結果變量屬于離散型變量,推斷則更為復雜二分類變量的結果(如結婚、離婚多分類定類測量結果如絕育、I服藥)定序次分類結果(如工作的低、中、高的滿意度計數(shù)數(shù)據(jù)(如某女性一年內(nèi)人工流產(chǎn)次數(shù)這些結果,不能再假定層-1是正態(tài)性的線性模型HLM的局限例解HLM的局限例解二分類結果變量Y的預測值在作為Y=1的發(fā)生概率來理解時,必須處于(0,1)值域內(nèi)該限制使模型定義的效應規(guī)模有意義須對預測值進行非線性轉(zhuǎn)換,如logit或probit轉(zhuǎn)換給定預測結果值條件下,層-1隨機效應只能取兩值之一,不可能為正態(tài)分布層-1隨機效應方差不–HLM的局HLM的局限例解計數(shù)數(shù)據(jù)Y的可能值是非負的整數(shù)0、1、2、……典型的正偏態(tài)分若0很少,Y*=log(1+Y或Y*=Y轉(zhuǎn)換可進行線性若事件發(fā)生頻數(shù)很少且存在大量的不能通過轉(zhuǎn)換來近似取得正態(tài)假定線性模型的預測值可能是負的模型系數(shù)的意義不能ConceptualandStatisticalConsiderasimplelevel-1ConceptualandStatisticalConsiderasimplelevel-10j1j(SES1ifinY0ifE[Yij|0j,1j]0j1j(SESthepersonspecificpredictedprobabilityProblemswiththisHLMassumesthelevel-1randomeffectrijtobewithconstantvariance.But,–Level-1ProblemswiththisHLMassumesthelevel-1randomeffectrijtobewithconstantvariance.But,–Level-1randomeffecthastwodiscrete?(SES] [01(SES)][ (SES01]01–Level-1varianceis?Var(Yij|0j,1j)ij(1ijTheTheLinearModelforijactuallymakesno–EachunitincreaseinSESshouldleadtoasmallerchangeinasijapproaches0orTherefore,wemovetoa“generalizedlinearratherthanastandardlinearmodelatlevel一般一般化線性模型這種方法可以適合許多類型的數(shù)據(jù),包括連續(xù)型結果、分類型結果、以及計數(shù)數(shù)據(jù)。表兩層表兩層一般化線性模型的例子一般化線性模型可以擴展到包括多個層次嵌套的場合。一般化線性模型可以擴展到包括多個層次嵌套的場合。標準一般化線性模型便成為其中的層-1模型。對離散變量用最大似然估計(ML)做一階近似對離散變量用最大似然估計(ML)做一階近似–Stiratelli、基于ML開發(fā)軟件,可采用不同的離散型結果Goldstein(1991),但Reslow&Clayton(1993)、MIXOR軟件和SASProcMixed軟件高階拉普拉斯變換(RaudenbushYang&Yosef,Osgood,Marshall,1995)重復測量研結果為二分類變量(是否發(fā)生犯罪就業(yè)或失業(yè)作為時間協(xié)變量,其它變量不涉及時變層-1模型解釋個人犯罪的OR的logistic模型個體參數(shù)在層-2中也存在變學生流失的影響因素研究學生流失的影響因素研究兩層模型-學生層次和學校層次層-1模型logistic回歸早期流失的OR依賴于學生的背景特征Sampson,Raudenbush計數(shù)數(shù)據(jù)作為結果研究小區(qū)年輕人的初始抽齡Reardon&Buka,生存模型層-1模型的組成一個抽樣模型一個連接函數(shù)一個結構模型HLM可視為GHLM的特例正態(tài)抽樣模型恒等連接函數(shù)線性結構模型在保持層-1模型中所有隨機系數(shù)不變時的層-結果的期望值。在保持層-1期望值不變條件下,層-1結果被假設為從某種概率分布中產(chǎn)生。這種層-1概率分布就稱為層-1抽樣模型。層-1抽樣模型兩層GHLM抽樣模型表層-1抽樣模型兩層GHLM抽樣模型表示為是獨立正態(tài)–表示給定預測值 條件下,層-1結果布,且有期望值μij和同方差–層-1期望值和方差可2對層-1結果的期望值進行轉(zhuǎn)換,令其轉(zhuǎn)換結果對層-1結果的期望值進行轉(zhuǎn)換,令其轉(zhuǎn)換結果等于回歸系數(shù)的線性函數(shù)。這種轉(zhuǎn)換被稱為層-1連接函數(shù)。連接函數(shù)將層-1預測值μij進行保證預測結果限制于給定區(qū)間這種轉(zhuǎn)換的預測值標注為有些連續(xù)變量無需轉(zhuǎn)換,即“恒等連接函數(shù)”與一個具與一個具有層-1系數(shù)的線性令層-1連接函數(shù)模型相等。這個線性模型就是層-1結構模型。線性結構模型為:層-1抽樣模型、層-1連接函數(shù)與層-1結構模型的組合起來,即為通常HLM的層-1模型過離散指層過離散指層-1結果的變異性可能大于根據(jù)層-抽樣模型所期望的水平。二分二分類結果的兩層模型層-1抽樣模型定義Yij層-1抽樣模型定義Yijmij次試驗當中“成功”的數(shù)量,?ij為–上式標志Yij服從有mij次試驗、每一次試驗成功概率為?ij的二項(Binomial)分布–根據(jù)二項分布性質(zhì),Yij的期望值和方差 層-2模型層-2模型量,具有多元正態(tài)分布,各分量的平均值為零、方差協(xié)方差矩陣為T。一個Bernoulli一個Bernoulli分布的例子:泰國學生留級研究TheThreeTheThreePartsoftheLevel-1ModelinSamplingmodel–describesthedistributionofthelevel-1observationsLinkfunction–transformsthemodel-predictedvaluestobewithintherequired–Structuralmodel–sameaswehaveseeninconventionalHLMmodels(Level2modelremainsthesameasinstandardHLM-multivariatenormalrandomeffects)Revisedlevel-1modelforbinaryLevel-1Sampling|ijRevisedlevel-1modelforbinaryLevel-1Sampling|ij~Bernoulli(ijE(Yij|ij)ij|ij)ij(1ijLevel-1Link 1Level-1Structural0j1j(SESHGLMforbinaryoutcomeLevel-1LinkexpOddsHGLMforbinaryoutcomeLevel-1LinkexpOdds 1 1log :``logodds(logitslogodds1Inprobabilityfromlogodds:ijexp(ij 1exp(ij ConversionLog<<ConversionLog<<10>>HLMasaSpecialCaseofLevel-1SamplingY|HLMasaSpecialCaseofLevel-1SamplingY|~2E(Y|)|)Level-1LinkLevel-1Structural0j1j(SESBinomialConsiderasimplelevel-1/mijBinomialConsiderasimplelevel-1/mij0j1j(SES)ijwhereYijisnumberofcoursefailureoutofcourses|0j,1j01j(SES) EthepersonspecificpredictedprobabilityofcourseProblemswiththistoHLMassumesthelevel-1randomeffectProblemswiththistoHLMassumesthelevel-1randomeffectwithconstantvariance.Level-1randomeffecthasonlydiscreteLevel-1varianceisij(1ij|0j,1mTheLinearModelforijactuallymakesnoEachunitincreaseinSESshouldleadtoasmallerchangeinijijapproaches0orRevisedlevel-1modelforbinomialLevel-1Sampling| ~BRevisedlevel-1modelforbinomialLevel-1Sampling| ~B(mij,ijisnumberofisprobabilityofE(Yij|ij)mijijVar(Yij|ij)mijij(1ijLevel-1Linklog 1Level-1Structural0j1j(SESCountConsiderasimplelevel-1CountConsiderasimplelevel-10j1j(SES)ij0,1,2,...numberofE[Yij|0j,1j]0j1j(SEStheperson-specificpredictedeventProblemswiththisProblemswiththistoHLMassumesthelevel-1randomeffectwithconstantvariance.Level-1randomeffectwillbeLevel-1varianceisVar(Yij|0j,1j)TheLinearModelforijactuallymakesnoEachunitincreaseinSESshouldleadtoasmallerchangeinijijapproachesRevisedlevel-1modelforcountLevel-1Revisedlevel-1modelforcountLevel-1Sampling|ij~Poisson(ijE(Yij|ij)ijLevel-1Link|ij) Level-1Structural0j1j(SESLevel-1modelforcountoutcome(variableLevel-1SamplingLevel-1modelforcountoutcome(variableLevel-1Sampling|ij~Poisson(mijijE(Yij|ij)mijijwheremijis|ij)mijLevel-1LinkLevel-1Structural0j1j(SESBernoulliExample:GradeBernoulliExample:GradeRetentionin–GraderepetitioninprimarygradesLevel-1–Sex,pre-primaryLevel-2–MeanProbabilityandLogOddsofProbabilityandLogOddsof(95%p.v.,ijPopulationAveragevs.Unit-Specificu0j,i.e.,PopulationAveragevs.Unit-Specificu0j,i.e.,u0jNotice:Foraschoolatthemedianprob.ofrepetitiondoesnotequalpopulationave.11ij(0)0.097[1Becauseprob.distributionispositivelyskewedMEAN>MEDIAN,whereasforMEAN=Unit-specificmodels(witharandomeffectforeachschoolàlaHLM)willnotdirectlyreproducepopulationavg.results.Resultofnon-linearlinkfunction.CharacteristicsCharacteristicsofUnit-SpecificDescribesaprocessatlevel1recurringwithineachWhatistheeffectofalevel-1predictorinagivenschoolholdingconstantthatschool’srandomHowdoesthiseffectvaryacrossHowdifferencesinlevel-2predictorsexplainvariabilityacrossgroupsinlevel-1coefficientsareintrinsicallyunit-specificquestions.CharacteristicsofPopulation-Average?CharacteristicsofPopulation-Average?Answerpopulationaverage?E.g.,Howdoesriskofgraderepetitiondependpre-primaryeducationacrossthe?Manypolicyconcernsmaybeaddressedpopulation-averageP-AVsU-Population-averageeffectwillP-AVsU-Population-averageeffectwilldifferfrom?isclosespecificestimates,especially000or1andis?Unit-specificmodelsmoredependentonassumptionsatlevelUnit-specific0j00u0| 11expUnit-specific0j00u0| 11exp 000011?Y| 0)10 100Population-average1E(Y)1 *0011?Y)11exp(?*)00ComparisonofUnit-SpecificandPopulation-AverageEffectsforThaiDataLevelLevelLogitLink:ComparisonofUnit-SpecificandPopulation-AverageEffectsforThaiDataLevelLevelLogitLink:LogitLink:Mean-----Pre-Primary---HGLMforHomicideHGLMforHomicideCountsinChicagoNeighborhoodsLevel-1SamplingYj|j~P(mj,jjishomiciderateper100,000peopleinneighborhoodmjisthepopulationsizeofneighborhoodj(inunitsofE(Yj|j)mjVar(Yj|j)mjLevel-1Linkjlog(jParameterParameterEstimationin“Penalizedquasi-likelihood”–requiresadoublyiterativealgorithm:microiterations–sameasstandardHLMiterations;continuetoconvergencealternatewithmacroiterations–dependentvariableandweightsrecomputed;thenbacktomicroiterationsParameterEstimationParameterEstimationinQuasi-penalizedlikelihoodisfastandconvergesreliablybutwilltendtounderestimateτespeciallyasτgetslarge.Therearebetterapproximations--LaplaceestimationinHLM6hasanerroroforderO(n-2)wherenisthetypicallevel1samplesize.Ifnissmall,however,shoulduseadaptiveGauss-Hermitequadratureorhigh-orderLaplace(whichweareintheprocessofaddingtoVersion7.)OrderedCategoricalOutcomeOrderedCategoricalOutcomeisordered–E.g.,Stronglydisagree,disagree,agree,stronglyagree;Never,sometimes,often,always.Examplequestionnaire–TeacherCommitment–“Ifyoucouldstartoveragainwouldyouchooseteachingasacareer?”–???1=“Yes”coded2=“Notsure”ProbabilityofrespondingincategorymPr(Rm)mProbabilityofrespondingincategorymPr(Rm)m1,...,MPr(R1)Pr("yes"Pr(R2)Pr("notsure"Pr(R1)Pr("no"ConvenienttousecumulativePr(R1)*112)Pr(RPr(R*123)3123ConceptualConceptualframefortheWeposittheexistenceofanunderlyingcontinuouslatentvariablethatdeterminesthecategorypeopleselect.Lowvaluesofthislatentvariableindicatelowlevelsofteachersatisfaction.SopeoplewhoareverylowwillsayPeopleinthemiddlewillsay“NotPeoplewhoareveryhighwillsay“Yes”So,M-1cumulativeprobabilitiesareofThecumulativePr(RmSo,M-1cumulativeprobabilitiesareofThecumulativePr(Rm)*mPr(Rm)1m*mwherem1,...,MThisbecomestheoutcomeinalogisticregression.“ProportionalOddsModel”mConsidertwocaseswhereConsidertwocaseswhereCase1:twopersonsdifferinX:Howdotheirpredictedvaluesdifferforagivencategory?mmXsom1m2(X1X2),whichdoesnotdependonCase2:Howdothepredictedvaluesofeachlogitdifferforanypersonacrosscategories?12so1i2i12,whichdoesnotdependonXorInsteadofoneInsteadofonethresholdforeachcategory,weshalluseaninterceptplusadifferenceforeachcategory.SoifM=3,wehave101201Xi301Xi12030ExtensiontoTwoLevel-1samplingmodelExtensiontoTwoLevel-1samplingmodelism*m)kLevel-1StructuralMQqjXLevel-1StructuralMQqjXqij0Level-2StructuralqjuqjHierarchicalGeneralizedHierarchicalGeneralizedLinearModelswithMultinomialCategoricalDataUseDataarenotDataviolateproportionaloddsPredictorshavedifferentassociationswiththeprobabilitiesofdifferentresponsesIfPr(Rij1) 2)Pr(Rij3)3ij1Level-1Samplingm,0DummySo,Level-1Samplingm,0DummySo,forthe3-category|mij)Var(Ymij|mij)mij(1mijCov(Ymij,Ym'ij)100100Level-1LinkForeachcategorym=1,…,M- m)Level-1LinkForeachcategorym=1,…,M- m)log log M)Misthe“referenceLevel-1Structuralmij0j(m)qj(m)XqijForM=3therewouldbetwolevel-1QQj(1)qj(1)XqijQj(2)qj(2)XqijLevel-2StructuralLevel-2Structuralq0(m)qj(m)uqj(m)whereq0,...,Post-secondaryDestinationsExamplePost-secondaryDestinationsExampleOutcome:20-year-oldswereaskedif–––Wereattendinga4-yearcollege(1)Wereattendinga2-yearcollegeDidnotattendpost-secondaryinstitutionLevel1:Grade-8mathachievement,race,sex,socio-economicstatus,familystructureLevel2:Catholicschoolattendance,otherprivateschoolattendanceComparisonofCoefficientsAcrossE.g.,RelativeoddsofCatholic-schoolandpublic-schoolComparisonofCoefficientsAcrossE.g.,RelativeoddsofCatholic-schoolandpublic-schoolstudentsattending4-yearschool(asopposedtonoschool))Pr(R1|Catholic)/Pr(R3|CatholicPr(R1|Public)/Pr(R3|PublicSimilarly,relativeoddsforattending2-yearschool(vs.no)Pr(R2|Catholic)/Pr(R3|CatholicPr(R2|Public)/Pr(R3|PublicAnd,relativeoddsforattending4-yearschoolvs.2-year)Pr(R1|Catholic)/Pr(R2|CatholicPr(R1|Public)/Pr(R2|Public與HLM有與HLM有關的一、如何匯報一、如何匯報的結果?定量研究文獻中,會有不同的回歸分析結果的方式傳達的信息才是較為完備、較為準確的呢?常見的表達方法(1)第一種表達方法在實際研究中,常常用*(1)第一種表達方法在實際研究中,常常用*表示在水平下統(tǒng)計性顯著,用**表示在平統(tǒng)計性顯著,用因變量:收自變量***表示在水平統(tǒng)計父親受教育水平母親受教育水平 鞋的尺碼-請大家思考,這一回歸分析結果的表達存在什么問題?評例如母親受評例如母親受教育水平鞋的尺碼-那么,在這種情況下,父親教育水平有*,而鞋的尺碼沒有*,那父親教育水平對收入的影響是否比

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論