全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件
4258 2
2005-09-25

I want to us ethnicity (4 levels) as a covariate in an ANCOVA procedure. I think the code is correct, but since I've never worked with a set, as covariate, I'm a little concerned. The Syntax Guide had little to say on this issue (see GLM: Repeated Measures, 726-734).

COMPUTE Ethnic1 = 0. COMPUTE Ethnic2 = 0. COMPUTE Ethnic3 = 0. DO IF (Ethnic EQ 1). - COMPUTE Ethnic1 = 1. ELSE IF (Ethnic EQ 2). - COMPUTE Ethnic2 = 1. ELSE IF (Ethnic EQ 3). - COMPUTE Ethnic3 = 1. END IF. GLM pretest posttest BY group WITH ethnic1 ethnic2 ethnic3 /WSFACTOR = time 2 /METHOD = SSTYPE(3) /EMMEANS = TABLES(group*time) WITH(ethnic1=MEAN ethnic2=MEAN ethnic3=MEAN) /CRITERIA = ALPHA(.05) /WSDESIGN = time /DESIGN = ethnic1 ethnic2 ethnic3 group . Any suggestions will be most welcome.

Stephen Salbod, Pace University, NYC

二维码

扫码加我 拉你入群

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

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

全部回复
2005-9-25 04:39:00

Covariates are supposed to be interval-level variables (they might be dummies), whereas categorical variables with several categories should be treated as factors, not as covariates. However, if you convert your ethnicity variable into a set of three dummies representing the four categories, you may use the dummies as covariates. Not strictly kosher but acceptable.

Hector

二维码

扫码加我 拉你入群

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

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

2005-9-25 04:41:00

Hi Stephen,

There may be a problem with your code. If you have any missing data, you've just relegated it to ethnic4 (the drop out category). When you run through your COMPUTEs for ethnic 1 to 3, teh missing data along with all you other cases got a value of 0. Then in the If statement the valid data for that ethnicity got a value of 1 on that pass, but you never correct the missing data. You might want to try this after the COMPUTE statements:

IF MISSING(ethnic) ethnic1 = $SYSMIS. IF MISSING(ethnic) ethnic2 = $SYSMIS. IF MISSING(ethnic) ethnic3 = $SYSMIS. IF MISSING(ethnic) ethnic4 = $SYSMIS.

Good luck.

Lisa T. Stickney Ph.D. Student The Fox School of Business and Management Temple University

二维码

扫码加我 拉你入群

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

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

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群