Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

# Re: st: Interactions in xreg

 From Morten Hesse To statalist@hsphsun2.harvard.edu Subject Re: st: Interactions in xreg Date Mon, 23 Aug 2010 12:05:13 +0200

```Thanks for your help!
```
I did that too, and it works. "Block" is of course an ordinal variable (1-5). Yet, I want to test whether the group with characteristic "ant" has a different pattern of behaviour over "blocks", and I have reasons to believe that that pattern is curvilinear, compared with subjects who do net have characteristic "ant" (scores increases towards the middle, of the test, decreases towards the end). I can of course test whether the parameter for subjects during the different blocks are significant (e.g., start versus middle, and middle versus start). And indeed, they are. But I have never seen that used as a test of curvilinearity, and I feel that it is a bit "informal".
```Am I wrong?
Greetings
Morten

Den 23-08-2010 10:40, Maarten buis skrev:
```
```--- On Mon, 23/8/10, Morten Hesse<mh@crf.au.dk>  wrote:
```
```I have data, where subjects are tested in 5 blocks.
Subjects vary on  variable "ant" (dummy coded). I want
to test of there is a curvi-linear effect of "ant" on
outcome igt.
blocksq=block^2 (to test curvi-linearity).
```
```This really depends on what is in your variable block.
If I see a variable names block I will by default assume
that it is categorical. In that case, computing the
square of that variable makes no sense. It could be an
ordinal variable. In that case computing the square
still makes no sense. You can only compute the square
if you believe the values that the variable block can
take also gives you information on the distances between
the categories. Stata obviously cannot see what you
believe, so it will alow you to compute a square of
any variable, regardelss of whether that makes sense
or not.

If block is categorical or ordinal you must enter it
as a categorical variable, e.g.:

xtreg igt i.ant#i.block age gender, mle

assuming you have Stata 11.

Hope this helps,
Maarten

--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://www.maartenbuis.nl
--------------------------

*
*   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/
```
```*
*   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/
```