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

Hello,

I'm constucting a nonlinear mixed model of some psycholinguistic data, with a binary dependent variable (correct/incorrect), and an independent three-level factor (verbtype) crossed with an independent two-level factor (sex). It'd be useful to be able to report a single statistic indicating whether the estimates for all six "cells" are non-different, analogous to the F-test of the interaction in a 3x2 ANOVA. In PROC MIXED this comes out in the Type 3 tests. But I can't figure out how to do this in NLMIXED, where the three-level factor has to be coded as two dummy-coded variables (real and reg).

Any advice? Code is below, but I think it's pretty standard.

Thanks, Chris

proc nlmixed data=input; parms intercept=1 real_c=.1 reg_c=.1 sex_c=.1 sex_real_c=.1 sex_reg_c=.1 log_subj_var=0; /* use exp(log) below to avoid negative variance estimates */

eta = intercept + real*real_c + reg*reg_c + sex*sex_c + sex*real*sex_real_c + sex*reg*sex_reg_c + rand_subj; /* random effect of subject */

/* Logistic function defines p in terms of eta */ /* It's the inverse of logit, which is ln(p/1-p). */ expeta = exp(eta); p = expeta / (1+expeta);

model Correct ~ binary(p); random rand_subj ~ normal(0, exp(log_subj_var)) subject=subject; run;

二维码

扫码加我 拉你入群

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

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

全部回复
2005-9-25 08:06:00

You can test the 2 df interaction term by testing the effects of sex*real and sex*reg jointly. A joint test can be conducted employing the CONTRAST statement. It is as simple as adding the statement contrast "Sex*Verb" sex_real_c, sex_reg_c;

Just before your RUN statement. The 2 df test for the main effect of verb would be constructed similarly.

Dale

二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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