ACCAspace_sitemap
PPclass_sitemap
sitemap_google
sitemap_baidu
CFA Forums
返回列表 发帖

SPSS教程第十课:对数线性模型

对数线性模型是用于离散型数据或整理成列联表格式的计数资料的统计分析工具。在对数线性模型中,所有用作的分类的因素均为独立变量,列联表各单元中的例数为应变量。对于列联表资料,通常作χ2 检验,但χ2 检验无法系统地评价变量间的联系,也无法估计变量间相互作用的大小,而对数线性模型是处理这些问题的最佳方法。

第一节 General过程

9.1.1 主要功能

调用该过程可对一个或多个二维列联表资料进行非层次对数线性分析。它只能拟合全饱和模型,即分类变量各自效应及其相互间效应均包含在对数线性模型中。

9.1.2 实例操作

[例9-1]在住院病人中,研究其受教育程度与对保健服务满意程度的关系,资料整理成列联表后如下所示。

对保健服务满意程度

(%)

受教育程度

满意

不满意

65 (91.5)

6 (8.5)

272 (93.8)

18 (6.2)

41 (97.6)

1 (2.4)

按一般情形作χ2检验,结果显示不同受教育程度的住院病人其对保健服务满意程度无差别。但从百分比分析中可见,随受教育程度的提高,满意程度有下降的趋势;且我们还想了解受教育程度与满意程度有无交互作用和交互作用的大小。对此,必须采用对数线性模型加以分析。

9.1.2.1 数据准备

激活数据管理窗口,定义变量名:实际观察频数的变量名为freq,受教育程度和满意程度作为行、列分类变量(即独立变量),变量名分别为educ、care。输入原始数据,结果如图9.1所示。如同第四章Crosstab过程中所述,为使列联表的频数有效,应选Data菜单的Weight Cases...项,弹出Weight Cases对话框(图9.2),激活Weight cases by项,从变量列表中选freq点击Ø钮使之进入Frequency Variable框,点击OK钮即可。

图9.1 原始数据的输入

图9.2 频数的加权定义

9.1.2.2 统计分析

激活Statistics菜单选Loglinear中的General...项,弹出General Loglinear Analysis对话框(图9.3)。从对话框左侧的变量列表中选care,点击Ø钮使之进入Factor(s)框,点击Define Range...钮,弹出General Loglinear Analysis: Define Range对话框,定义分类变量care的范围,本例为1、2,故可在Minimum处键入1,在Maximum处键入2,点击Continue钮返回General Loglinear Analysis对话框。同法将变量educ选入Factor(s)框,并定义其范围为1、3。本例要求计算各分类变量主效应和交互作用的参数估计,故点击Contrast...钮,弹出General Loglinear Analysis:Contrasts对话框,选择Display parameter estimates项,点击Continue钮返回General Loglinear Analysis对话框,最后点击OK钮即完成分析。

图9.3 非层次对数线性模型分析对话框

9.1.2.3 结果解释

在结果输出窗口中将看到如下统计数据:

首先显示系统对403例资料进行分析,共有二个分类变量:CARE为2水平,EDUC为3水平。分析的效应有三类:满意程度(CARE)、教育程度(EDUC)和两者的交互作用(CARE BY EDUC)。系统经2次叠代后即达到相邻二次估计之差不大于规定的0.001。

DATA Information

6 unweighted cases accepted.

0 cases rejected because of out-of-range factor values.

0 cases rejected because of missing data.

403 weighted cases will be used in the analysis.

FACTOR Information

Factor Level Label

CARE 2

EDUC 3

DESIGN Information

1 Design/Model will be processed.

Correspondence Between Effects and Columns of Design/Model 1

Starting Ending

Column Column Effect Name

1 1 CARE

2 3 EDUC

4 5 CARE BY EDUC

Note: for saturated models .500 has been added to all observed cells.

This value may be changed by using the CRITERIA = DELTA subcommand.

*** ML converged at iteration 2.

Maximum difference between successive iterations = .00000

由于本例对Model(模型)未作定义,故系统采用默认的全饱和模型,因而期望例数(EXP.count)与实际例数(OBS. count)相同,进而残差(Residual)、标准化残差(Std.Resid)和校正残差(Adj.Resid)均为0。

Observed, Expected Frequencies and Residuals

Factor Code OBS. count & PCT. EXP. count & PCT. Residual Std. Resid. Adj. Resid.

CARE 1

EDUC 1 65.50 (16.13) 65.50 (16.13) .0000 .0000 .0000

EDUC 2 272.50 (67.12) 272.50 (67.12) .0000 .0000 .0000

EDUC 3 41.50 (10.22) 41.50 (10.22) .0000 .0000 .0000

CARE 2

EDUC 1 6.50 ( 1.60) 6.50 ( 1.60) .0000 .0000 .0000

EDUC 2 18.50 ( 4.56) 18.50 ( 4.56) .0000 .0000 .0000

EDUC 3 1.50 ( .37) 1.50 ( .37) .0000 .0000 .0000

最后输出参数估计的结果。为了唯一地估计参数,系统强行限定同一分类变量的各水平参数之和为0,故根据下列结果可推得各参数为:

λ满意 = 1.386724028

λ不满意 = -1.386724028

λ高教育程度 = -0.091477207

λ中教育程度 = 1.144301306

λ低教育程度 = -1.052824099

λ满意.高教育程度 = -0.231600045

λ满意.中高教育程度 = -0.041790087

λ满意.低教育程度 = 0.273390132

λ不满意.高教育程度 = 0.231600045

λ不满意.中教育程度 = 0.041790087

λ不满意.低教育程度 = -0.273390132

λ值为正,表示正效应;反之为负效应;零为无效应。分析提供的信息是:①对保健服务的满意程度高于不满意程度;②中等教育程度者的满意程度>高等教育程度者的满意程度>低等教育程度者的满意程度;③通过受教育程度与对保健服务满意程度的交互作用研究,结果表明高、中等教育未能增加人们对现有保健服务状况的满意程度。

Estimates for Parameters

CARE

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 1.386724028 .15965 8.68589 1.07381 1.69964

EDUC

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

2 -.091477207 .19895 -.45980 -.48142 .29847

3 1.144301306 .17407 6.57393 .80313 1.48547

CARE BY EDUC

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

4 -.231600045 .19895 -1.16410 -.62154 .15834

5 -.041790087 .17407 -.24008 -.38296 .29938

TOP

第二节 Hierarchical过程

9.2.1 主要功能

调用该过程可对多维列联表资料进行分层对数线性分析。所谓分层即并可根据用户指定的条件,对某一或某些主效应与交互作用进行剔除,从而形成包含特定层次阶项的各种模型。

9.2.2 实例操作

[例9-2] 为了研究Colles骨折在不同性别中的年龄分布情况,以说明不同性别者骨折的年龄差异及其年度变化,某地收集了1978--1981年的骨折资料,数据见下表。请作对数线性模型的分析。

年龄

1978

1979

1980

1981

0—19

20--59

60--89

55

165

50

17

260

94

43

101

29

9

233

115

89

104

56

20

202

95

140

137

54

41

278

153

9.2.2.1 数据准备

激活数据管理窗口,定义变量名:实际观察频数的变量名为freq,年份、性别和年龄为分类变量,变量名分别为year、sex和age。输入原始数据,其中年份1978至1981依次为1、2、3、4,性别男为1、女为2,年龄分组依次为1、2、3。之后选Data菜单的Weight Cases...项,在Weight Cases对话框中激活Weight cases by项,从变量列表中选freq点击Ø钮使之进入Frequency Variable框,点击OK钮完成对频数的权重定义。

9.2.2.2 统计分析

激活Statistics菜单选Loglinear中的Hierarchical...项,弹出Hierarchical Loglinear Analysis对话框(图9.4)。从对话框左侧的变量列表中选age,点击Ø钮使之进入Factor(s)框,点击Define Range...钮,弹出Hierarchical Loglinear Analysis: Define Range对话框,定义分类变量age的范围,在Minimum处键入1,在Maximum处键入9,点击Continue钮返回Hierarchical Loglinear Analysis对话框。同法将变量sex选入Factor(s)框,定义其范围为1、2;将变量year选入Factor(s)框,定义其范围为1、4。

图9.4 层次对数线性模型分析对话框

为了更好地拟合数据,并尽可能的简单和易于解释,本例选择向后剔除法建立模型,即从所有效应均在模型中开始,然后消除那些不满足保留判据的效应。点击Model...钮,弹出Hierarchical Loglinear Analysis: Model对话框,在Model Building栏中选Use backward elimination项,点击Continue钮返回Hierarchical Loglinear Analysis对话框。

本例要求作参数估计,故点击Options...钮,弹出Hierarchical Loglinear Analysis: Options对话框,在Display for Saturated Model栏中选Parameter estimates项,点击Continue钮返回Hierarchical Loglinear Analysis对话框,之后点击OK钮即完成分析。

9.2.2.3 结果解释

在结果输出窗口中将看到如下统计数据:

首先显示,共有2540个观察例数进入分析,其中分类变量AGE为3水平,SEX为2水平,YEAR为4水平。采用全饱和模型,高阶项为年龄、性别和年份三者的交互作用。(在层次对数线性模型分析中,当指定高阶项时,即意味着包含其所属变量所有可能组合的低阶项;如本例,即包含年龄和性别的交互作用、年龄和年份的交互作用、性别和年份的交互作用、年龄的主效应、性别的主效应、年份的主效应。从最高阶到最低阶共为3阶。)

DATA Information

24 unweighted cases accepted.

0 cases rejected because of out-of-range factor values.

3 cases rejected because of missing data.

2540 weighted cases will be used in the analysis.

FACTOR Information

Factor Level Label

AGE 3

SEX 2

YEAR 4

DESIGN 1 has generating class

AGE*SEX*YEAR

Note: For saturated models .500 has been added to all observed cells.

This value may be changed by using the CRITERIA = DELTA subcommand.

The Iterative Proportional Fit algorithm converged at iteration 1.

The maximum difference between observed and fitted marginal totals is .000

and the convergence criterion is .278

TOP

系统以全饱和模型为起始,故显示各变量的实际例数、期望例数、残差和标准化残差,因期望例数与实际例数相同,进而残差、标准化残差均为0。

Observed, Expected Frequencies and Residuals.

Factor Code OBS count EXP count Residual Std Resid

AGE 1

SEX 1

YEAR 1 55.5 55.5 .00 .00

YEAR 2 43.5 43.5 .00 .00

YEAR 3 89.5 89.5 .00 .00

YEAR 4 140.5 140.5 .00 .00

SEX 2

YEAR 1 17.5 17.5 .00 .00

YEAR 2 9.5 9.5 .00 .00

YEAR 3 20.5 20.5 .00 .00

YEAR 4 41.5 41.5 .00 .00

AGE 2

SEX 1

YEAR 1 165.5 165.5 .00 .00

YEAR 2 101.5 101.5 .00 .00

YEAR 3 104.5 104.5 .00 .00

YEAR 4 137.5 137.5 .00 .00

SEX 2

YEAR 1 260.5 260.5 .00 .00

YEAR 2 233.5 233.5 .00 .00

YEAR 3 202.5 202.5 .00 .00

YEAR 4 278.5 278.5 .00 .00

AGE 3

SEX 1

YEAR 1 50.5 50.5 .00 .00

YEAR 2 29.5 29.5 .00 .00

YEAR 3 56.5 56.5 .00 .00

YEAR 4 54.5 54.5 .00 .00

SEX 2

YEAR 1 94.5 94.5 .00 .00

YEAR 2 115.5 115.5 .00 .00

YEAR 3 95.5 95.5 .00 .00

YEAR 4 153.5 153.5 .00 .00

Goodness-of-fit test statistics

Likelihood ratio chi square = .00000 DF = 0 P = 1.000

Pearson chi square = .00000 DF = 0 P = 1.000

下面,系统先显示某一阶及其更高阶交互效应为0时的似然比χ2检验概率值,因K为3时的概率值=0.1964>0.05,故认为年龄、性别、年份三者的交互作用为0,亦即含1阶(单一变量主效应)及2阶(变量两两交互效应)的模型就能恰当地表述数据。

接着,系统又显示特定阶交互效应为0时的似然比χ2检验概率值,结果表明,单纯含1阶(单一变量主效应)或单纯含2阶(变量两两交互效应)的模型也能恰当地表述数据。

Tests that K-way and higher order effects are zero.

K DF L.R. Chisq Prob Pearson Chisq Prob Iteration

3 6 8.615 .1964 8.547 .2007 4

2 17 404.424 .0000 425.168 .0000 2

1 23 1279.591 .0000 1293.594 .0000 0

Tests that K-way effects are zero.

K DF L.R. Chisq Prob Pearson Chisq Prob Iteration

1 6 875.167 .0000 868.426 .0000 0

2 11 395.809 .0000 416.621 .0000 0

3 6 8.615 .1964 8.547 .2007 0

Note: For saturated models .500 has been added to all observed cells.

This value may be changed by using the CRITERIA = DELTA subcommand.

TOP

系统所确定的模型中各参数值如下所示,由于内容较多,各λ值如何推算及其所表示的意义,请读者参阅本章第一节。

Estimates for Parameters.

AGE*SEX*YEAR

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 -.1412276052 .08417 -1.67784 -.30621 .02375

2 .1674922915 .10130 1.65335 -.03106 .36605

3 -.0169870288 .07921 -.21447 -.17223 .13826

4 .0577506145 .05557 1.03925 -.05117 .16667

5 -.0069187948 .06504 -.10637 -.13440 .12057

6 -.0817851831 .05570 -1.46819 -.19097 .02740

AGE*SEX

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 .7059980126 .04848 14.56319 .61098 .80102

2 -.2968871102 .03276 -9.06301 -.36109 -.23268

AGE*YEAR

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 -.1762097434 .08417 -2.09344 -.34119 -.01123

2 -.3051792054 .10130 -3.01249 -.50374 -.10662

3 .1339590237 .07921 1.69127 -.02129 .28920

4 .1990874838 .05557 3.58269 .09017 .30800

5 .1982170140 .06504 3.04744 .07073 .32570

6 -.1646071030 .05570 -2.95499 -.27379 -.05543

SEX*YEAR

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 .0471962901 .04918 .95960 -.04920 .14360

2 -.0778801067 .05818 -1.33868 -.19191 .03615

3 .0827715134 .04734 1.74836 -.01002 .17556

AGE

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 -.7212868272 .04848 -14.87857 -.81630 -.62627

2 .7999110228 .03276 24.41872 .73571 .86412

SEX

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 -.0348756276 .02856 -1.22099 -.09086 .02111

YEAR

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 -.0205234390 .04918 -.41728 -.11692 .07588

2 -.3188195595 .05818 -5.48020 -.43285 -.20479

3 -.0126524013 .04734 -.26725 -.10544 .08014

系统开始对全饱和模型进行从高阶到低阶的效应项剔除。第一步,剔除3阶交互效应项(AGE*SEX*YEAR)导致χ2值为8.615,概率为0.1964(不小于默认判据0.05),故该效应项被剔除。

第二步,剔除2阶交互效应项,概率均小于0.05,故2阶交互效应项不能剔除。即本例用2阶交互效应项(同时含1阶主效应项)描述模型已为最佳。

Backward Elimination (p = .050) for DESIGN 1 with generating class

AGE*SEX*YEAR

Likelihood ratio chi square = .00000 DF = 0 P = 1.000

If Deleted Simple Effect is DF L.R. Chisq Change Prob Iter

AGE*SEX*YEAR 6 8.615 .1964 4

Step 1

The best model has generating class

AGE*SEX

AGE*YEAR

SEX*YEAR

Likelihood ratio chi square = 8.61546 DF = 6 P = .196

If Deleted Simple Effect is DF L.R. Chisq Change Prob Iter

AGE*SEX 2 310.816 .0000 2

AGE*YEAR 6 62.829 .0000 2

SEX*YEAR 3 13.024 .0046 2

Step 2

The best model has generating class

AGE*SEX

AGE*YEAR

SEX*YEAR

Likelihood ratio chi square = 8.61546 DF = 6 P = .196

The final model has generating class

AGE*SEX

AGE*YEAR

SEX*YEAR

The Iterative Proportional Fit algorithm converged at iteration 0.

The maximum difference between observed and fitted marginal totals is .131

and the convergence criterion is .278

由于剔除了3阶交互效应项,故原全饱和模型变为层次模型,因而期望例数改变,期望例数与实际例数不同,进而残差、标准化残差均不为0。若标准化残差界于-1.96—1.96范围内,则表示模型是恰当的。从下面的结果可知,本例的标准化残差均在-1.96—1.96范围内,故层次模型是适合的。

Observed, Expected Frequencies and Residuals.

Factor Code OBS count EXP count Residual Std Resid

AGE 1

SEX 1

YEAR 1 55.0 59.0 -4.05 -.53

YEAR 2 43.0 39.1 3.88 .62

YEAR 3 89.0 88.3 .69 .07

YEAR 4 140.0 140.5 -.50 -.04

SEX 2

YEAR 1 17.0 13.0 4.04 1.12

YEAR 2 9.0 12.9 -3.88 -1.08

YEAR 3 20.0 20.7 -.70 -.15

YEAR 4 41.0 40.5 .53 .08

AGE 2

SEX 1

YEAR 1 165.0 163.0 1.99 .16

YEAR 2 101.0 97.9 3.07 .31

YEAR 3 104.0 112.6 -8.62 -.81

YEAR 4 137.0 133.5 3.54 .31

SEX 2

YEAR 1 260.0 262.0 -1.99 -.12

YEAR 2 233.0 236.1 -3.07 -.20

YEAR 3 202.0 193.4 8.62 .62

YEAR 4 278.0 281.6 -3.55 -.21

AGE 3

SEX 1

YEAR 1 50.0 47.9 2.06 .30

YEAR 2 29.0 36.0 -6.95 -1.16

YEAR 3 56.0 48.1 7.92 1.14

YEAR 4 54.0 57.0 -3.03 -.40

SEX 2

YEAR 1 94.0 96.1 -2.05 -.21

YEAR 2 115.0 108.0 6.95 .67

YEAR 3 95.0 102.9 -7.92 -.78

YEAR 4 153.0 150.0 3.02 .25

Goodness-of-fit test statistics

Likelihood ratio chi square = 8.61546 DF = 6 P = .196

Pearson chi square = 8.54688 DF = 6 P = .201

TOP

第三节 Logit过程

9.3.1 主要功能

调用此过程可完成对一个应变量与一个或多个自变量之间对数线性模型的拟合。如果分类变量未区分应变量和自变量,那么应采用本章第一、二节介绍的方法;如果应变量是二分计量,自变量是连续计量,那么应采用Logistic回归方法(详见第八章)。

9.3.2 实例操作

[例9.3]在艾滋病(AIDS)相关的知识、观念、行为研究(KAB Study)中,获得了不同年龄和受教育水平的公众,对预防AIDS知识掌握程度的资料,经整理成列联表如下所示。很明显,对预防AIDS知识的掌握程度与公众的年龄和受教育水平有关,即若预防AIDS知识掌握程度为应变量,则应该受到年龄和受教育水平两个自变量的影响。下面将运用带应变量的对数线性模型进行分析。

受教育水平

年龄

预防AIDS知识掌握程度

好 一般 差

20-

30-

40-

50-

53

28

31

19

40

21

32

6

2

3

8

11

20-

30-

40-

50-

67

71

38

9

103

141

94

66

24

101

87

136

20-

30-

40-

50-

2

16

8

3

3

22

98

76

17

19

247

156

9.3.2.1 数据准备

激活数据管理窗口,定义变量名:实际观察频数的变量名为freq;预防AIDS知识掌握程度变量名为aids,按好、一般、差分别输入1、2、3;受教育水平变量名为educ,按高、中、低分别输入1、2、3;年龄变量名为age,20-至50-依次输入1—4。输入原始数据后选Data菜单的Weight Cases...项,在Weight Cases对话框中激活Weight cases by项,从变量列表中选freq点击Ø钮使之进入Frequency Variable框,点击OK钮即可。

9.3.2.2 统计分析

激活Statistics菜单选Loglinear中的Logit...项,弹出Logit Loglinear Analysis对话框(图9.5)。从对话框左侧的变量列表中选aids,点击Ø钮使之进入Dependent框,点击Define Range...钮,弹出Logit Loglinear Analysis: Define Range对话框,定义应变量aids的范围,在Minimum处键入1,在Maximum处键入3,点击Continue钮返回Logit Loglinear Analysis对话框。从对话框左侧的变量列表中选age,点击Ø钮使之进入Factor(s)框,点击Define Range...钮,定义自变量age的范围为1、4;同法将自变量educ选入Factor(s)框,并定义其范围为1、3。本例要求计算各变量主效应和交互作用的参数估计,故点击Contrast...钮,弹出Logit Loglinear Analysis:Contrasts对话框,选择Display parameter estimates项,点击Continue钮返回Logit Loglinear Analysis对话框,最后点击OK钮即完成分析。

图9.5 Logit对数线性模型对话框

TOP

9.3.2.3 结果解释

在结果输出窗口中将看到如下统计数据:

系统显示共有1858个观察例数进入分析,分析涉及三个变量,其中AIDS为3水平,AGE为4水平,EDUC为3水平。将产生3阶4类效应,即:预防AIDS知识掌握程度主效应(因AIDS被定义为应变量,故不再分析子变量AGE、EDUC的主效应),预防AIDS知识掌握程度分别与年龄、受教育程度的交互效应,预防AIDS知识掌握程度、年龄、受教育程度三者的交互效应。之后系统显示实际例数、期望例数、残差、标准化残差和校正残差。

DATA Information

36 unweighted cases accepted.

0 cases rejected because of out-of-range factor values.

0 cases rejected because of missing data.

1858 weighted cases will be used in the analysis.

FACTOR Information

Factor Level Label

AIDS 3

AGE 4

EDUC 3

DESIGN Information

1 Design/Model will be processed.

Correspondence Between Effects and Columns of Design/Model 1

Starting Ending

Column Column Effect Name

1 2 AIDS

3 8 AIDS BY AGE

9 12 AIDS BY EDUC

13 24 AIDS BY AGE BY EDUC

Note: for saturated models .500 has been added to all observed cells.

This value may be changed by using the CRITERIA = DELTA subcommand.

*** ML converged at iteration 2.

Maximum difference between successive iterations = .00000.

Observed, Expected Frequencies and Residuals

Factor Code OBS. count & PCT. EXP. count & PCT. Residual Std. Resid. Adj. Resid.

AIDS 1

AGE 1

EDUC 1 53.50 (55.44) 53.50 (55.44) .0000 .0000 .0000

EDUC 2 67.50 (34.53) 67.50 (34.53) .0000 .0000 .0000

EDUC 3 2.50 (10.64) 2.50 (10.64) .0000 .0000 .0000

AGE 2

EDUC 1 28.50 (53.27) 28.50 (53.27) .0000 .0000 .0000

EDUC 2 71.50 (22.73) 71.50 (22.73) .0000 .0000 .0000

EDUC 3 16.50 (28.21) 16.50 (28.21) .0000 .0000 .0000

AGE 3

EDUC 1 31.50 (43.45) 31.50 (43.45) .0000 .0000 .0000

EDUC 2 38.50 (17.46) 38.50 (17.46) .0000 .0000 .0000

EDUC 3 8.50 ( 2.40) 8.50 ( 2.40) .0000 .0000 .0000

AGE 4

EDUC 1 19.50 (52.00) 19.50 (52.00) .0000 .0000 .0000

EDUC 2 9.50 ( 4.47) 9.50 ( 4.47) .0000 .0000 .0000

EDUC 3 3.50 ( 1.48) 3.50 ( 1.48) .0000 .0000 .0000

AIDS 2

AGE 1

EDUC 1 40.50 (41.97) 40.50 (41.97) .0000 .0000 .0000

EDUC 2 103.50 (52.94) 103.50 (52.94) .0000 .0000 .0000

EDUC 3 3.50 (14.89) 3.50 (14.89) .0000 .0000 .0000

AGE 2

EDUC 1 21.50 (40.19) 21.50 (40.19) .0000 .0000 .0000

EDUC 2 141.50 (44.99) 141.50 (44.99) .0000 .0000 .0000

EDUC 3 22.50 (38.46) 22.50 (38.46) .0000 .0000 .0000

AGE 3

EDUC 1 32.50 (44.83) 32.50 (44.83) .0000 .0000 .0000

EDUC 2 94.50 (42.86) 94.50 (42.86) .0000 .0000 .0000

EDUC 3 98.50 (27.79) 98.50 (27.79) .0000 .0000 .0000

AGE 4

EDUC 1 6.50 (17.33) 6.50 (17.33) .0000 .0000 .0000

EDUC 2 66.50 (31.29) 66.50 (31.29) .0000 .0000 .0000

EDUC 3 76.50 (32.35) 76.50 (32.35) .0000 .0000 .0000

AIDS 3

AGE 1

EDUC 1 2.50 ( 2.59) 2.50 ( 2.59) .0000 .0000 .0000

EDUC 2 24.50 (12.53) 24.50 (12.53) .0000 .0000 .0000

EDUC 3 17.50 (74.47) 17.50 (74.47) .0000 .0000 .0000

AGE 2

EDUC 1 3.50 ( 6.54) 3.50 ( 6.54) .0000 .0000 .0000

EDUC 2 101.50 (32.27) 101.50 (32.27) .0000 .0000 .0000

EDUC 3 19.50 (33.33) 19.50 (33.33) .0000 .0000 .0000

AGE 3

EDUC 1 8.50 (11.72) 8.50 (11.72) .0000 .0000 .0000

EDUC 2 87.50 (39.68) 87.50 (39.68) .0000 .0000 .0000

EDUC 3 247.50 (69.82) 247.50 (69.82) .0000 .0000 .0000

AGE 4

EDUC 1 11.50 (30.67) 11.50 (30.67) .0000 .0000 .0000

EDUC 2 136.50 (64.24) 136.50 (64.24) .0000 .0000 .0000

EDUC 3 156.50 (66.17) 156.50 (66.17) .0000 .0000 .0000

Goodness-of-Fit test statistics

Likelihood Ratio Chi Square = .00000 DF = 0 P = 1.000

Pearson Chi Square = .00000 DF = 0 P = 1.000

TOP

下一段为拟合优度的检验。系统采用分散相似测量法(Dispersion Similarity Measure),测量值界于-1至+1之间,愈靠近| 1 |,拟合优度愈好。本例为0.145879。

Analysis of Dispersion

Dispersion

Source of Variation Entropy Concentration DF

Due to Model 314.875 173.206

Due to Residual 1642.491 1014.119

Total 1957.365 1187.325 3750

Measures of Association

Entropy = .160867

Concentration = .145879

最后,系统输出对数线性模型的各效应参数值。

由于内容较多,具体推算过程不再赘述(参阅本章第一节)。此处以AIDS主效应和AIDS与EDUC交互效应为例,演示如下:

预防AIDS知识掌握程度主效应部分,参数为

λAIDS-好 = -0.378234829

λAIDS-一般 = 0.3307195684

λAIDS-差 = 0- (-0.378234829) - 0.3307195684 = 0.0475152606

这表明公众预防AIDS知识掌握程度一般。

预防AIDS知识掌握程度与受教育水平交互效应部分,参数为

λAIDS好-EDUC高 = 1.097077448

λAIDS好-EDUC中 = -0.186500026

λAIDS好-EDUC低 = 0 - 1.097077448 - (-0.186500026) = -0.910577422

λAIDS一般-EDUC高 = -0.018774593

λAIDS一般-EDUC中 = 0.0930200827

λAIDS一般-EDUC低 = 0 - (-0.018774593) - 0.0930200827 = 0.0742454897

λAIDS差-EDUC高 = 0 - 1.097077448 - (-0.018774593) = 1.078302855

λAIDS差-EDUC中 = 0 - (-0.186500026) - 0.0930200827 = 0.0934799433

λAIDS差-EDUC低 = 0 - 1.078302855 - 0.0934799433 = -1.1717827983

这表明受教育水平高,预防AIDS知识掌握程度好;受教育水平低,预防AIDS知识掌握程度一般。为什么不体现受教育水平低,预防AIDS知识掌握程度差的信息呢?显然,这还需要结合年龄的因素进行分析。若用户将全部λ值都推算出来,其中会得到:

λAIDS差-AGE20-EDUC低 = 0.727782785

λAIDS差-AGE30-EDUC低 = -0.546798785

λAIDS差-AGE40-EDUC低 = 0.181007389

λAIDS差-AGE50-EDUC低 = -0.361991389

其趋势大约是年龄大的、受教育水平低的,预防AIDS知识掌握程度就较差。

Estimates for Parameters

AIDS

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

1 -.378234829 .07013 -5.39360 -.51568 -.24079

2 .3307195684 .06115 5.40864 .21087 .45057

AIDS BY AGE

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

3 .5610569048 .14377 3.90234 .27926 .84286

4 .4747703448 .10184 4.66178 .27516 .67438

5 -.317497183 .10192 -3.11520 -.51726 -.11774

6 .0139480312 .13188 .10577 -.24453 .27243

7 .0027846286 .09475 .02939 -.18292 .18849

8 .0999432599 .08316 1.20189 -.06304 .26293

AIDS BY EDUC

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

9 1.097077448 .09401 11.67000 .91282 1.28133

10 -.186500026 .08160 -2.28558 -.34643 -.02657

11 -.018774593 .09212 -.20382 -.19932 .16177

12 .0930200827 .06828 1.36233 -.04081 .22685

AIDS BY AGE BY EDUC

Parameter Coeff. Std. Err. Z-Value Lower 95 CI Upper 95 CI

13 -.165975990 .18396 -.90225 -.52653 .19458

14 .1990147721 .15635 1.27292 -.10742 .50545

15 -.400615540 .15180 -2.63910 -.69814 -.10309

16 -.254356695 .11603 -2.19225 -.48177 -.02695

17 .0248775102 .13931 .17858 -.24817 .29793

18 .3092579898 .12025 2.57183 .07357 .54494

19 .5096508480 .17810 2.86156 .16057 .85873

20 .1850931544 .14164 1.30682 -.09251 .46270

21 .1964166680 .15202 1.29206 -.10154 .49437

22 -.088243218 .10424 -.84656 -.29255 .11606

23 .0455872550 .12925 .35269 -.20775 .29893

24 -.198715366 .09651 -2.05897 -.38788 -.00955

TOP

对数线形模型的Logit过程中如何设置参照数值,系统默认最小为参照,我的二分类变量是0 1 现在我想设置1为参照,给如何设置呢?各位高手请帮帮我.谢谢!

TOP

返回列表