资源描述
,单击此处编辑母版标题样式,单击此处编辑母版文本样式,第二级,第三级,第四级,第五级,*,Institute of Computer Software,Nanjing University,*,2025/1/12 周日,做,HLM,的一些注意点,贾良定,Institute of Computer Software,Nanjing University,1,2025/1/12 周日,2,HLM,中选项,HLM other setting,选,:,Controlling estimation,Full maximum likelihood,Institute of Computer Software,Nanjing University,2025/1/12 周日,3,注意,Restricted maximum likelihood,方法只评价,random,的方差好坏,所以会出错。对,deviance,产生影响,Sig R,2,是,level 1,的,R,2,.Level 2,的,R,2,在,variance components,中。,Deviance,是,HLM,变化的最好报告值。,报告所有的,variance,相加之和,报告它的变化情况而不报告各自变化情况。,为什么要看,final estimation of fixed effects(with robust standard errors),。主要是数据分布很难达到正态分布。,Robust estimation,放松了此假设。如果确信数据正态分布,看上面的表也可以。,Institute of Computer Software,Nanjing University,2025/1/12 周日,4,注意,一般只报告,shapiro-wilk,值做正态分布检验,有人说,sobel test,只适合,single level,的检验。,Monte carlo method,适合单、跨层次的,mediation,检验。有样本自助法和参数自助法,bootstrapping,两种方法,Proclin,方法做,mediation testing,Institute of Computer Software,Nanjing University,2025/1/12 周日,5,Incremental model,在第,1,层次用,grand mean centering,。,Level 1 variance=between+within+random,Level 2 variance=between+random,在,level 1,用,grand mean centering,时,,level 1,上保留了,between,和,within,的方差,又减少了,random variance.,X 2,X 1,Y1,Level 2,Level 1,Institute of Computer Software,Nanjing University,2025/1/12 周日,6,Mediational model,若,X1,存在,则,grand mean centering,若,X1,不存在,仅做,X2,M1,,则,grand mean centering,或,group mean centering,,效果一样。,若,X1,X2 Y1,则必须用,grand mean centering,。,X 2,X 1,Y1,Level 2,Level 1,M 1,Institute of Computer Software,Nanjing University,2025/1/12 周日,7,Moderational model,此时,,level 1,必须用,group mean centering.,因为,level 1,上有三部分的方差,,between+within+random,。此时,group mean centering,就把,level 1,的方差干净为,within+random,,所以,level 2,的,X2,是对,within variance,的调节。,若在,level 1,上用,grand mean centering,由,level 1,上还存在,between+within+random,三部分方差。此时,X2,的调节作用分不清是对,between,的影响,还是,within,的影响。,X 2,X 1,Y1,Level 2,Level 1,Institute of Computer Software,Nanjing University,2025/1/12 周日,8,Separate model,用,group,mean,centering,与,incremental model,相同。,Institute of Computer Software,Nanjing University,SPSS data preparation,Data Clean,注意:有的变量名太长,另存为,.sd7 version,时候,进入,HLM,不能进入,mdm,之中。,所以,变量名不能多于,8,个字符。,不同层次的,ID,:,变成,numeric,从小到大排序,2025/1/12 周日,9,Institute of Computer Software,Nanjing University,2025/1/12 周日,10,用,HLM,分析高级,SPSS,版本数据,先将,SPSS,数据另存为,sas v7-8,.sd7(short-term),Make new MDM file,stata package input,在,Input File Type,中选,Anything else(stat/transfer),Institute of Computer Software,Nanjing University,2025/1/12 周日,11,Institute of Computer Software,Nanjing University,2025/1/12 周日,12,Institute of Computer Software,Nanjing University,2025/1/12 周日,13,Institute of Computer Software,Nanjing University,输完第一层次的数据后,,missing data,Yes;running analysis,每个层次的数据选择完成后,给,mdm,一个文件名,并给保存的路径,Make mdm,Check Stats,:认真研究一下这个,TXT,文件的,statistics,,问为什么不同层次的样本是这么多?回去再看看数据。,都完成了,,Done,:出现下面的页面,2025/1/12 周日,14,Institute of Computer Software,Nanjing University,2025/1/12 周日,15,2025/1/12 周日,16,Institute of Computer Software,Nanjing University,这个页面叫:,null model,2025/1/12 周日,17,Institute of Computer Software,Nanjing University,Null model:Step 1 in Table 1 of Aguinis et al.(2013,JoM),or Table 2 of Chang et al.(2014,JAP),只有,dependent variable,,没有任何,predictors;,这个模型是看每个层次能够解释因变量的方差比重。,Run Analysis-run,于是出现一个,DOS,运行页面,然后自动消失,2025/1/12 周日,18,Institute of Computer Software,Nanjing University,2025/1/12 周日,19,Institute of Computer Software,Nanjing University,Results,Final estimation of fixed effects,(with robust standard errors),-,Standard Approx.,Fixed Effect Coefficient Error T-ratio d.f.P-value,-,For INTRCPT1,P0,For INTRCPT2,B00,INTRCPT3,G000 4.101265 0.064731 63.359 25 0.000,-,Final estimation of level-1 and level-2 variance components:,-,Random Effect Standard Variance df Chi-square P-value,Deviation Component,-,INTRCPT1,R0 0.34884 0.12169 23 165.51585 0.000,level-1,E 0.33156 0.10993,-,Final estimation of level-3 variance components:,-,Random Effect Standard Variance df Chi-square P-value,Deviation Component,-,INTRCPT1/INTRCPT2,U00 0.17353 0.03011 24 34.32270 0.079,-,Statistics for current covariance components model,-,Deviance =285.220776,Number of estimated parameters=4,2025/1/12 周日,20,Institute of Computer Software,Nanjing University,有三个层次的,variance,we can calculate the DVs variance proportion that each level can explain.,DV total variance=0.10993(L1)+0.12169(L2)+0.03011(L3)=0.26173,%L1=0.10993/0.26173=42%,%L2=0.12169/0.26173=46%,%L3=0.03011/0.26173=12%,2025/1/12 周日,21,Institute of Computer Software,Nanjing University,Control model:Step 2 in Table 2 of Chang et al.(2014,JAP),2025/1/12 周日,22,Institute of Computer Software,Nanjing University,Random intercept and fixed slope model:Step 2 in Table 1 of Aguinis et al.(2013,JoM),or Step 3 in Table 2 of Chang et al.(2014,JAP),2025/1/12 周日,23,Institute of Computer Software,Nanjing University,Random intercept and Random slope model:Step 3 in Table 1 of Aguinis et al.(2013,JoM),or Step 4 in Table 2 of Chang et al.(2014,JAP),2025/1/12 周日,24,Institute of Computer Software,Nanjing University,Slope(L2)variance,Intercept-slope(L2)covariance,上面两个值都可以在,Results,中的,Tau(beta),矩阵中有。,注意:,variance is not negative;co-variance may be negative or positive or zero.,2025/1/12 周日,25,Institute of Computer Software,Nanjing University,Cross-Level Interaction:Random intercept and random slope,Step 4 in Table 1 of Aguinis et al.(2013,JoM),or Step 5 or 6 in Table 2 of Chang et al.(2014,JAP),2025/1/12 周日,26,Institute of Computer Software,Nanjing University,2025/1/12 周日,27,Institute of Computer Software,Nanjing University,如果需要画图和计算线的,slope and their significance,,需要在,HLM,的,other setting,中的,output setting,中选择输出,Variance-covariance matrix,。,去,www.quantpsy.org,:去计算,slope and their significance,www.jeremydawson.co.uk/slopes.htm,:,去画图,2025/1/12 周日,28,Institute of Computer Software,Nanjing University,2025/1/12 周日,29,
展开阅读全文