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

# re: st: margins after split-plot anova

 From "Airey, David C" To "statalist@hsphsun2.harvard.edu" Subject re: st: margins after split-plot anova Date Sat, 23 Jun 2012 09:19:46 -0500

```.

One source for adding a covariate to a split plot design is Chapter 11 in Variations on Split Plot and Split Block Experimental Designs (Wiley 2007).

Cheers,

-Dave

> Thank you.
> In the following example the option at() does not work (not estimable):
>
> anova depvar c.IQ group / id|group label label#group label#c.IQ , repeated (label)
> margins, within(group) at( IQ=(1))
>
> There is something about having a continuous covariate in the anova model that I’m missing or that does not work in Stata.
>
> Let’s look at the following examples:
> - no continuous covariate:
> 1) anova depvar group / id|group label label#group, repeated (label)
> margins, within(group)
>
> 2) regress depvar group label label#group
> margins group
>
> - with continuous covariate:
> 3) anova depvar c.IQ group / id|group label label#group label#c.IQ , repeated (label)
> margins, within(group)
>
> 4)regress depvar c.IQ group label label#group label#c.IQ
> margins group
>
>
> The output of margins in 1), 2), AND 3) are equal. The output of 4) is (correctly) different from 1) and 2), because 4) includes a continuous covariate that is not present in 1) and 2).
> And the problem (again, perhaps I’m missing something simple, but I don’t know what) is that the outcome of margins in 3) is equal to the outcome of margins in 1) and 2).
>
> Thank you again for any help anybody can provide.
> Luca

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