Thanks to Dan for this exemplary closure of a thread.
Nick
[email protected]
Dan Waldo
Thanks to Martin Weiss and Nick Cox for suggesting ways to diagnose the
problem I posted back on April 24. And special thanks to Phil Ender at
UCLA, one of the authors of xi3, who spent considerable time with me
offline to figure out what was happening.
To close this thread, Phil and I agreed on this message:
"The -xi3- program is rather old with versions going back to 2001. It
doesn't work with some of the newer Stata commands, and we have pretty
much stopped supporting it. If you type the command "which xi3" you'll
see a note that says "freaks out if length of terms exceeds 32." I think
that you have run into this limit.
"I suggest that you look into the -desmat- program written by John
Hendrickx. Version 3.2 (on SSC) was updated in 2004. With my simple
tests, it was able to create four-way interactions directly. I hope
that -desmat- will meet your needs. Best of luck."
From: Dan Waldo <[email protected]>
I am trying to test the nested interactions of 4 variables (n, a, g, and
s) on the depvar drg_wgt using xi3 and glm.
Stata tells me the following:
. xi3: glm drg_wgt i.n*i.a*i.g i.a*i.g*i.s [pweight=weight] , f(gamma)
i.n _In_0-2 (naturally coded; _In_0 omitted)
i.a _Ia_0-65 (naturally coded; _Ia_45 omitted)
i.g _Ig_1-2 (naturally coded; _Ig_1 omitted)
i.s _Is_1-7 (naturally coded; _Is_4 omitted)
varlist not allowed
The code works with a 3-way term and a 2-way term, but not with 2 3-way
terms. Stata should be disregarding the duplicate 2-way interactions;
all 4 explanatory variables are numeric (byte); and the drg_wgt is a
floating-point number. What am I missing? (What worries me is that I
thought this same code had run back in January, and this now casts doubt
on my memory of other events in that month.)
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/