Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: st: AW: Interaction with squared variable


From   Nick Winter <[email protected]>
To   [email protected]
Subject   Re: AW: st: AW: Interaction with squared variable
Date   Tue, 13 Oct 2009 11:52:24 -0400

looks like it is a problem with -_rmcoll-, which is called by -oprobit- but not by -regress-. -_rmcoll- turns "i.foreign#c.weight#c.weight" into "i.foreign#co.weight#co.weight", which then throws the error.


. _rmcoll rep78 c.weight#c.weight i.foreign#c.weight#c.weight

. ret li

scalars:
          r(k_omitted) =  1

macros:
r(varlist) : "rep78 c.weight#c.weight i(0 1)b0.foreign#co.weight#co.weight"

. reg rep78 c.weight#c.weight i(0 1)b0.foreign#co.weight#co.weight
invalid interaction specification;

multiple 'o' operators attached to a single variable are not allowed within an interaction specification{p_end}
r(198);

* with one of the "co" turned to "c":
. reg rep78 c.weight#c.weight i(0 1)b0.foreign#co.weight#c.weight

Source | SS df MS Number of obs = 69 -------------+------------------------------ F( 2, 66) = 19.51 Model | 24.7558569 2 12.3779284 Prob > F = 0.0000 Residual | 41.8818243 66 .634573095 R-squared = 0.3715 -------------+------------------------------ Adj R-squared = 0.3525 Total | 66.6376812 68 .979965899 Root MSE = .7966

------------------------------------------------------------------------------
rep78 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
    c.weight#|
c.weight | -1.62e-08 2.27e-08 -0.71 0.479 -6.15e-08 2.92e-08
             |
     foreign#|
    c.weight#|
    c.weight |
1 | 2.14e-07 4.27e-08 5.01 0.000 1.29e-07 2.99e-07
             |
_cons | 3.222682 .2806022 11.48 0.000 2.662441 3.782922
------------------------------------------------------------------------------


Martin Weiss wrote:
<>
I used to think that the expansion of the -fvvarlist- happened
"independently" of the estimation command that requested it...



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Nick Winter
Gesendet: Dienstag, 13. Oktober 2009 17:29
An: [email protected]
Betreff: Re: st: AW: Interaction with squared variable

I can reproduce this with the auto dataset. Seems like something for technical support...


. regress rep78 i.foreign c.weight c.weight#c.weight i.foreign#(c.weight#c.weight)

<<model estimation output omitted>>

. oprobit rep78 i.foreign c.weight c.weight#c.weight i.foreign#(c.weight#c.weight)

invalid interaction specification;

multiple 'o' operators attached to a single variable are not allowed within an interaction specification{p_end}
r(198);


Nick Winter



Giuseppe Cappelletti wrote:
This is the message I get when I use the command ( oprobit  y
i.gender c.x  c.x#c.x  i.gender#(c.x#c.x) )
"invalid interaction specification;
multiple 'o' operators attached to a single variable are not allowed
within an interaction specification{p_end}"

The same command works if I use a linear model that is regress y
i.gender c.x  c.x#c.x  i.gender#(c.x#c.x).

Thanks  in advance

Giuseppe

<>

" but it does not work".


What exactly does not work? Note the FAQ onthis point...



HTH
Martin
*
*   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/


--
--------------------------------------------------------------
Nicholas Winter                                 434.924.6994 t
Assistant Professor                             434.924.3359 f
Department of Politics                  [email protected] e
University of Virginia          faculty.virginia.edu/nwinter w
PO Box 400787, 100 Cabell Hall
Charlottesville, VA 22904

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



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