Has anyone created a counter example?
i.e., where -test, test() matvlc()- works after -anova-?
If you trace this, you'll see it goes to an internal procedure called _test. It (or something it calls) generates the error. Since it is internal, the code cannot be traced.
Tom
-----------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Martin Weiss
Sent: Tuesday, February 24, 2009 3:04 PM
To: [email protected]
Subject: st: Re: RE: AW: matvlc option not allowed after -anova-
<>
For anyone who wants to recreate Alan`s prob:
***********
clear*
input hr ag id time
84.2 0 1392 0
90.8 0 1392 4
76.1 0 1392 -7
63.6 0 6291 0
62.3 0 6291 -7
66.4 0 6291 4
77.3 1 4011 -7
82.1 1 4011 0
77.6 1 4011 4
51.6 1 5695 0
51.5 1 5695 4
47.9 1 5695 -7
59.7 1 6867 -7
57.1 1 6867 0
49.5 1 6867 4
73.8 1 7108 4
64.5 1 7108 -7
76.4 1 7108 0
72.8 1 7218 0
74.5 1 7218 4
66.2 1 7218 -7
end
l
anova hr ag/id|ag time
test,showorder
mat def cc=(1,1,0,0,0,0,0,0,0,0,0,0,0\1,0,1,0,0,0,0,0,0,0,0,0,0)
mat l cc
test,test(cc) mtest
test,test(cc) mtest matvlc(M)
************
I hope this leads to more discussion than witnessed so far...
HTH
Martin
_______________________
----- Original Message -----
From: "Feiveson, Alan H. (JSC-SK311)" <[email protected]>
To: <[email protected]>
Sent: Tuesday, February 24, 2009 7:30 PM
Subject: st: RE: AW: matvlc option not allowed after -anova-
> Martin - Yes, sorry - I should have given the full anova command. Here is
> full output for a reduced data set that gives the same error:
>
> Al
>
> . list hr ag id time,noobs
>
> +-------------------------+
> | hr ag id time |
> |-------------------------|
> | 84.2 0 1392 0 |
> | 90.8 0 1392 4 |
> | 76.1 0 1392 -7 |
> | 63.6 0 6291 0 |
> | 62.3 0 6291 -7 |
> |-------------------------|
> | 66.4 0 6291 4 |
> | 77.3 1 4011 -7 |
> | 82.1 1 4011 0 |
> | 77.6 1 4011 4 |
> | 51.6 1 5695 0 |
> |-------------------------|
> | 51.5 1 5695 4 |
> | 47.9 1 5695 -7 |
> | 59.7 1 6867 -7 |
> | 57.1 1 6867 0 |
> | 49.5 1 6867 4 |
> |-------------------------|
> | 73.8 1 7108 4 |
> | 64.5 1 7108 -7 |
> | 76.4 1 7108 0 |
> | 72.8 1 7218 0 |
> | 74.5 1 7218 4 |
> |-------------------------|
> | 66.2 1 7218 -7 |
> +-------------------------+
>
> anova hr ag/id|ag time
>
> Number of obs = 21 R-squared =
> 0.9268
> Root MSE = 4.23546 Adj R-squared =
> 0.8780
>
> Source | Partial SS df MS F Prob
> > F
> -----------+----------------------------------------------------
> Model | 2724.43049 8 340.553811 18.98
> 0.0000
> |
> ag | 302.399954 1 302.399954 0.65
> 0.4565
> id|ag | 2323.83339 5 464.766678
> -----------+----------------------------------------------------
> time | 98.1971419 2 49.0985709 2.74
> 0.1049
> |
> Residual | 215.269643 12 17.9391369
> -----------+----------------------------------------------------
> Total | 2939.70013 20 146.985006
>
> . test,showorder
>
> Order of columns in the design matrix
> 1: _cons
> 2: (ag==0)
> 3: (ag==1)
> 4: (time==-7)
> 5: (time==0)
> 6: (time==4)
> 7: (id==1392)*(ag==0)
> 8: (id==4011)*(ag==1)
> 9: (id==5695)*(ag==1)
> 10: (id==6291)*(ag==0)
> 11: (id==6867)*(ag==1)
> 12: (id==7108)*(ag==1)
> 13: (id==7218)*(ag==1)
>
> . matrix list cc
>
> cc[2,13]
> c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13
> r1 1 1 0 0 0 0 0 0 0 0 0 0 0
> r1 1 0 1 0 0 0 0 0 0 0 0 0 0
>
> . test,test(c) mtest
>
> ( 1) _cons + ag[1] = 0
>
> ---------------------------------------
> | F(df,12) df p
> -------+-------------------------------
> (1) | 555.60 1 0.0000 #
> -------+-------------------------------
> all | 555.60 1 0.0000
> ---------------------------------------
> # unadjusted p-values
>
> . test,test(c) mtest matvlc(M)
> option matvlc() not allowed
> r(198);
>
> . .
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Martin Weiss
> Sent: Tuesday, February 24, 2009 11:46 AM
> To: [email protected]
> Subject: st: AW: matvlc option not allowed after -anova-
>
>
> <>
>
>
> Well, can you frame the problem in terms of an example that is accessible
> to all? It is hard to create one for oneself. Your -anova- is in replay
> mode, right?
>
>
>
> HTH
> Martin
>
>
> -----Ursprüngliche Nachricht-----
> Von: [email protected]
> [mailto:[email protected]] Im Auftrag von Feiveson,
> Alan H. (JSC-SK311)
> Gesendet: Dienstag, 24. Februar 2009 18:18
> An: [email protected]
> Betreff: st: matvlc option not allowed after -anova-
>
> Hi - I can't seem to get the syntax correct for the -matvlc- optin after
> anova. Here's what the help file says under anova postestimation:
>
>
> Syntax for test after anova
>
> test, test(matname) [mtest[(opt)] matvlc(matname)] syntax 1
>
> matvlc(matname), a programmer's option, saves the variance-covariance
> matrix
> of the linear combinations involved in the suite of tests. For the
> test
> Lb = c, what is returned in matname is LVL', where V is the
> estimated
> variance-covariance matrix of b.
>
> But when I try the -matvlc- option, I get an error:
>
> Can anyone tell me what's wrong?
>
> Thanks
>
> Al Feiveson
>
>
> . anova
>
> Number of obs = 45 R-squared =
> 0.8711
> Root MSE = 5.62952 Adj R-squared =
> 0.7975
>
> Source | Partial SS df MS F Prob
> >
> F
>
> -----------+----------------------------------------------------
> Model | 5997.12926 16 374.820579 11.83
> 0.0000
> |
> ag | 1212.91789 1 1212.91789 38.27
> 0.0000
> id|ag | 4084.81901 13 314.216847 9.91
> 0.0000
> time | 699.39236 2 349.69618 11.03
> 0.0003
> |
> Residual | 887.361024 28 31.6914652
>
> -----------+----------------------------------------------------
> Total | 6884.49028 44 156.465688
>
> . test,showorder
>
> Order of columns in the design matrix
> 1: _cons
> 2: (ag==0)
> 3: (ag==1)
> 4: (time==-7)
> 5: (time==0)
> 6: (time==4)
> 7: (id==1392)*(ag==0)
> 8: (id==4011)*(ag==1)
> 9: (id==5695)*(ag==1)
> 10: (id==6291)*(ag==0)
> 11: (id==6867)*(ag==1)
> 12: (id==7108)*(ag==1)
> 13: (id==7218)*(ag==1)
> 14: (id==7330)*(ag==0)
> 15: (id==7694)*(ag==1)
> 16: (id==8138)*(ag==0)
> 17: (id==8168)*(ag==0)
> 18: (id==8920)*(ag==1)
> 19: (id==9098)*(ag==0)
> 20: (id==9203)*(ag==1)
> 21: (id==9997)*(ag==0)
>
> . matrix list c
>
> c[2,21]
> c1 c2 c3 c4 c5 c6
> c7 c8
> r1 1 1 0 .33333333 .33333333 .33333333
> .14285714 0
> r1 1 0 1 .33333333 .33333333 .33333333
> 0 .125
>
> c9 c10 c11 c12 c13 c14
> c15 c16
> r1 0 .14285714 0 0 0 .14285714
> 0 .14285714
> r1 .125 0 .125 .125 .125 0
> .125 0
>
> c17 c18 c19 c20 c21
> r1 .14285714 0 .14285714 0 .14285714
> r1 0 .125 0 .125 0
>
> . test,test(c) mtest
>
> ( 1) _cons + ag[1] + .3333333 time[1] + .3333333 time[2] + .3333333
> time[3] + .1428571 id[1]*ag[1
>> ] + .1428571 id[4]*ag[1] + .1428571 id[8]*ag[1] + .1428571
>> id[10]*ag[1] +
> .1428571 id[11]*ag[1] +
>> .1428571 id[13]*ag[1] + .1428571 id[15]*ag[1] = 0
> ( 2) _cons + ag[2] + .3333333 time[1] + .3333333 time[2] + .3333333
> time[3] + .125 id[2]*ag[2] +
>> .125 id[3]*ag[2] + .125 id[5]*ag[2] + .125 id[6]*ag[2] + .125
>> id[7]*ag[2]
> + .125 id[9]*ag[2] + .1
>> 25 id[12]*ag[2] + .125 id[14]*ag[2] = 0
>
> ---------------------------------------
> | F(df,28) df p
> -------+-------------------------------
> (1) | 3883.24 1 0.0000 #
> (2) | 3313.40 1 0.0000 #
> -------+-------------------------------
> all | 3598.32 2 0.0000
> ---------------------------------------
> # unadjusted p-values
>
> . test,test(c) mtest matvlc(M)
> option matvlc() not allowed
> r(198);
>
> .
>
> *
> * 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/
>
> *
> * 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/
CONFIDENTIALITY NOTE: This e-mail message, including any attachment(s), contains information that may be confidential, protected by the attorney-client or other legal privileges, and/or proprietary non-public information. If you are not an intended recipient of this message or an authorized assistant to an intended recipient, please notify the sender by replying to this message and then delete it from your system. Use, dissemination, distribution, or reproduction of this message and/or any of its attachments (if any) by unintended recipients is not authorized and may be unlawful.
*
* 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/