楼主: ReneeBK
1741 1

Why are these hierarchical linear regression results in R and SPSS different? [推广有奖]

  • 1关注
  • 62粉丝

VIP

学术权威

14%

还不是VIP/贵宾

-

TA的文库  其他...

R资源总汇

Panel Data Analysis

Experimental Design

威望
1
论坛币
49407 个
通用积分
51.8704
学术水平
370 点
热心指数
273 点
信用等级
335 点
经验
57815 点
帖子
4006
精华
21
在线时间
582 小时
注册时间
2005-5-8
最后登录
2023-11-26

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

When I try to use the data and example for HLR from this example dataset taken from this post in the R Tutorial Series on hierarchical linear regression the results don't match when I try to use the same method in SPSS. Is it because SPSS is using a different type of sum of squares (III)?


The F values match for the final model, but not the 2nd one and some of the sum of squares seem off.



#R method
url <- "http://dl.dropbox.com/u/10246536/Web/RTutorialSeries/dataset_hlr.csv"datavar <- read.csv(url, header=T)#create three linear models using lm(FORMULA, DATAVAR)
#one predictor modelonePredictorModel <- lm(ROLL ~ UNEM, datavar)
#two predictor modeltwoPredictorModel <- lm(ROLL ~ UNEM + HGRAD, datavar)#three predictor modelthreePredictorModel <- lm(ROLL ~ UNEM + HGRAD + INC, datavar)


#get summary data for each model using summary(OBJECT)
summary(onePredictorModel)
summary(twoPredictorModel)
summary(threePredictorModel)


#compare successive models using anova(MODEL1, MODEL2, MODELi)
test<- anova(onePredictorModel, twoPredictorModel, threePredictorModel)

Below here is the code for SPSS.

*SPSS method
data list free /YEAR ROLL UNEM HGRAD INC.
begin data
1   5501    8.1 9552    1923
2   5945    7   9680    1961
3   6629    7.3 9731    1979
4   7556    7.5 11666   2030
5   8716    7   14675   2112
6   9369    6.4 15265   2192
7   9920    6.5 15484   2235
8   10167   6.4 15723   2351
9   11084   6.3 16501   2411
10  12504   7.7 16890   2475
11  13746   8.2 17203   2524
12  13656   7.5 17707   2674
13  13850   7.4 18108   2833
14  14145   8.2 18266   2863
15  14888   10.1    19308   2839
16  14991   9.2 18224   2898
17  14836   7.7 18997   3123
18  14478   5.7 19505   3195
19  14539   6.5 19800   3239
20  14395   7.5 19546   3129
21  14599   7.3 19117   3100
22  14969   9.2 18774   3008
23  15107   10.1    17813   2983
24  14831   7.5 17304   3069
25  15081   8.8 16756   3151
26  15127   9.1 16749   3127
27  15856   8.8 16925   3179
28  15938   7.8 17231   3207
29  16081   7   16816   3345
end
data.REGRESSION
/MISSING LISTWISE
/STATISTICS COEFF OUTS R ANOVA CHANGE
/CRITERIA=PIN (.05) POUT(.10)
/NOORIGIN
/DEPENDENT ROLL
/METHOD=ENTER UNEM
/METHOD=ENTER HGRAD
/METHOD=ENTER INC.

Or did I mess something up in the procedure for SPSS?






二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:Hierarchical regression regressio Different regress different

沙发
ReneeBK 发表于 2014-4-17 01:49:43 |只看作者 |坛友微信交流群
Yes, type I is often referred to as hierarchical (or sequential) decomposition in linear model. Default (in SPSS) type III is in no way hierarchical.

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注jltj
拉您入交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-5-1 14:13