st: Command -contrast- after -anova

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

st: Command -contrast- after -anova

Herve STOLOWY
Dear Statalisters:

I have some difficulties in using the -constrast- command (downloadable from ssc) after -anova-.

Here is my -anova- command line with the output.

anova return info risk info*risk if round>7 & round<26 & offer==1 & win==1, detail

  Factor        Value          Value          Value          Value
  ------------------------------------------------------------------------
  info          1 0            2 1          

  risk          1 0            2 1          

                           Number of obs =    2309     R-squared     =  0.0401
                           Root MSE      = .026537     Adj R-squared =  0.0389

                  Source |  Partial SS    df       MS           F     Prob > F
              -----------+----------------------------------------------------
                   Model |  .067894615     3  .022631538      32.14     0.0000
                         |
                    info |  .007341846     1  .007341846      10.43     0.0013
                    risk |  .045207121     1  .045207121      64.20     0.0000
               info*risk |  .010246209     1  .010246209      14.55     0.0001
                         |
                Residual |  1.62318282  2305  .000704201  
              -----------+----------------------------------------------------
                   Total |  1.69107744  2308  .000732703  


In the -contrast- command, I use the following syntax:

contrast return info risk, coeffs(1 1),  if round>7 & round<26 & offer==1 & win==1

and it does not work.

I am almost sure that the figures after coeffs are wrong. To be honest, I do not understand very well the help file of -contrast-. (I tried the examples given in this file, based on auto.dta, but it returns an error message).

Does someone have some practice with -contrast-?

(I read the Stata manual and the differents threads in the Statalist. It seems that the -contrast- command should avoid using the command -test- with matrices after anova).

Best regards

Herve








***********************************************************
Professeur/Professor
President of the French Accounting Association (AFC)
HEC Paris
Departement Comptabilite Controle de gestion / Dept of Accounting and Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
France
Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
mail: stolowy at hec dot fr
web: http://www.hec.fr/stolowy

*
*   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/
Reply | Threaded
Open this post in threaded view
|

st: RE: Command -contrast- after -anova

Martin Weiss-5
Line for the server...

What is the error code that you get?

- net describe contrast, from(http://fmwww.bc.edu/RePEc/bocode/c)- gives
1998 as the distribution date, and the command requests -version 4.0- when
run. The examples given are indeed defunct, but it seems that no one has
worked on them for at least a decade.

Anyway, you should say if you use anything other than official Stata`s
commands in your posts...

HTH
Martin


-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Herve STOLOWY
Sent: Tuesday, December 09, 2008 3:06 PM
To: [hidden email]
Subject: st: Command -contrast- after -anova

Dear Statalisters:

I have some difficulties in using the -constrast- command (downloadable from
ssc) after -anova-.

Here is my -anova- command line with the output.

anova return info risk info*risk if round>7 & round<26 & offer==1 & win==1,
detail

  Factor        Value          Value          Value          Value
  ------------------------------------------------------------------------
  info          1 0            2 1          

  risk          1 0            2 1          

                           Number of obs =    2309     R-squared     =
0.0401
                           Root MSE      = .026537     Adj R-squared =
0.0389

                  Source |  Partial SS    df       MS           F     Prob >
F
 
-----------+----------------------------------------------------
                   Model |  .067894615     3  .022631538      32.14
0.0000
                         |
                    info |  .007341846     1  .007341846      10.43
0.0013
                    risk |  .045207121     1  .045207121      64.20
0.0000
               info*risk |  .010246209     1  .010246209      14.55
0.0001
                         |
                Residual |  1.62318282  2305  .000704201  
 
-----------+----------------------------------------------------
                   Total |  1.69107744  2308  .000732703  


In the -contrast- command, I use the following syntax:

contrast return info risk, coeffs(1 1),  if round>7 & round<26 & offer==1 &
win==1

and it does not work.

I am almost sure that the figures after coeffs are wrong. To be honest, I do
not understand very well the help file of -contrast-. (I tried the examples
given in this file, based on auto.dta, but it returns an error message).

Does someone have some practice with -contrast-?

(I read the Stata manual and the differents threads in the Statalist. It
seems that the -contrast- command should avoid using the command -test- with
matrices after anova).

Best regards

Herve








***********************************************************
Professeur/Professor
President of the French Accounting Association (AFC)
HEC Paris
Departement Comptabilite Controle de gestion / Dept of Accounting and
Management Control
1, rue de la Liberation
78351 - Jouy-en-Josas
France
Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
mail: stolowy at hec dot fr
web: http://www.hec.fr/stolowy

*
*   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/
Reply | Threaded
Open this post in threaded view
|

Re: st: Command -contrast- after -anova

Airey, David C
In reply to this post by Herve STOLOWY
see -anovacontrast- from ATS UCLA by Phil Ender

-Dave

On Dec 9, 2008, at 8:06 AM, Herve STOLOWY wrote:

> Dear Statalisters:
>
> I have some difficulties in using the -constrast- command  
> (downloadable from ssc) after -anova-.
>
> Here is my -anova- command line with the output.
>
> anova return info risk info*risk if round>7 & round<26 & offer==1 &  
> win==1, detail
>
>  Factor        Value          Value          Value          Value
>  
> ------------------------------------------------------------------------
>  info          1 0            2 1
>
>  risk          1 0            2 1
>
>                           Number of obs =    2309     R-squared      
> =  0.0401
>                           Root MSE      = .026537     Adj R-squared  
> =  0.0389
>
>                  Source |  Partial SS    df       MS           F      
> Prob > F
>              -----------
> +----------------------------------------------------
>                   Model |  .067894615     3  .022631538      
> 32.14     0.0000
>                         |
>                    info |  .007341846     1  .007341846      
> 10.43     0.0013
>                    risk |  .045207121     1  .045207121      
> 64.20     0.0000
>               info*risk |  .010246209     1  .010246209      
> 14.55     0.0001
>                         |
>                Residual |  1.62318282  2305  .000704201
>              -----------
> +----------------------------------------------------
>                   Total |  1.69107744  2308  .000732703
>
>
> In the -contrast- command, I use the following syntax:
>
> contrast return info risk, coeffs(1 1),  if round>7 & round<26 &  
> offer==1 & win==1
>
> and it does not work.
>
> I am almost sure that the figures after coeffs are wrong. To be  
> honest, I do not understand very well the help file of -contrast-.  
> (I tried the examples given in this file, based on auto.dta, but it  
> returns an error message).
>
> Does someone have some practice with -contrast-?
>
> (I read the Stata manual and the differents threads in the  
> Statalist. It seems that the -contrast- command should avoid using  
> the command -test- with matrices after anova).
>
> Best regards
>
> Herve
>
>
>
>
>
>
>
>
> ***********************************************************
> Professeur/Professor
> President of the French Accounting Association (AFC)
> HEC Paris
> Departement Comptabilite Controle de gestion / Dept of Accounting  
> and Management Control
> 1, rue de la Liberation
> 78351 - Jouy-en-Josas
> France
> Tel: +33 1 39 67 94 42 - Fax: +33 1 39 67 70 86
> mail: stolowy at hec dot fr
> web: http://www.hec.fr/stolowy
>
> *
> *   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/