Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Using the constant term from ANOVA in lincom


From   rps <[email protected]>
To   <[email protected]>
Subject   st: Using the constant term from ANOVA in lincom
Date   Thu, 20 Jul 2006 13:19:59 -0400

I'm having trouble using the constant term in lincom following an ANOVA.
Here's what I've done:

#delimit ;
anova y 
      subj|group group tmcond method
      group*tmcond group*method tmcond*method
      group*tmcond*method;

...ANOVA Output produced...

lincom _cons+_coef[group[1]]+_coef[tmcond[1]]+_coef[method[1]]
       +_coef[group[1]*tmcond[1]]+_coef[group[1]*method[1]]
       +_coef[tmcond[1]*method[1]]+_coef[group[1]*tmcond[1]*method[1]];
invalid syntax
r(198);

It seemed that lincom could not reference the constant term _cons, so I
tried another tack by explicitly fitting the constant:

gen const = 1

#delimit ;
anova y 
      const subj|group group tmcond method
      group*tmcond group*method tmcond*method
      group*tmcond*method, noconstant;

...ANOVA Output produced...

lincom _coef[const]+_coef[group[1]]+_coef[tmcond[1]]+_coef[method[1]]
       +_coef[group[1]*tmcond[1]]+_coef[group[1]*method[1]]
       +_coef[tmcond[1]*method[1]]+_coef[group[1]*tmcond[1]*method[1]];
_b[const] not found
r(111);

In either case I can't use the constant term in lincomp. Any suggestions are
welcome. I'm looking for the model estimate of the mean and its se for the
group==1, method==1, tmcond==1 cell of the design.

Thank you, 
Richard Steiner


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index