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;