Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE : st: RE: How to implement ranktest of matrix
From
Komi Agbemavi Mati <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE : st: RE: How to implement ranktest of matrix
Date
Thu, 8 Jul 2010 09:01:24 -0400
No I want to test whether the rank of the matrix is 0, 1 or 2. The matrix have two columns
.0002178 .0000277
.0003644 .0000637
.0022189 -.0004827
.0012441 .0000804
-.0182371 -.0013471
.0026022 .0008305
Tanks
________________________________________
De : [email protected] [[email protected]] de la part de Austin Nichols [[email protected]]
Date d'envoi : 8 juillet 2010 08:28
À : [email protected]
Objet : Re: st: RE: How to implement ranktest of matrix
Mark--
The poster might have wanted a statistical test of the rank of the dgp
of the matrix (or a comparison of the two matrices), which is what
-ranktest- does, right? But how can an N by 1 matrix have rank
greater than 1?
On Wed, Jul 7, 2010 at 7:39 PM, Schaffer, Mark E <[email protected]> wrote:
> Komi,
>
>> -----Original Message-----
>> From: [email protected]
>> [mailto:[email protected]] On Behalf Of
>> Komi Agbemavi Mati
>> Sent: 07 July 2010 20:43
>> To: [email protected]
>> Subject: st: How to implement ranktest of matrix
>>
>> I need to test whether the following matrix have rank 0, 1
>> or 2. I am trying to use ranktest in stata but i don't
>> know what to put in Y and what
>> to put in Z as described in the help file.
>>
>> dqdZ1 dqdz2
>> .0002178 .0000277
>> .0003644 .0000637
>> .0022189 -.0004827
>> .0012441 .0000804
>> -.0182371 -.0013471
>> .0026022 .0008305
>>
>> When I try the following command
>> ranktest dqdZ1 dqdz2,
>
> If you want to know the rank of a Stata matrix like the one above, you
> can use, say, the Mata function rank() (see help mf_rank). You would
> move the matrix from Stata into Mata and then use the rank() function.
>
> -ranktest- is different. (Mea culpa - on re-reading the help file, I
> think this could be clearer.) It is for testing the rank of a matrix of
> correlations or regression parameters.
>
> When you say
>
> ranktest dqdZ1 dqdz2
>
> what is happening is basically the same thing as regressing dqdZ1 on
> dqdz2 and testing whether the regression parameter is nonzero (i.e.,
> rank>0). I suspect this isn't what you want, and instead you want the
> rank of the Stata matrix above, but perhaps I'm wrong here.
>
> Hope this helps.
>
> Cheers,
> Mark
>
*
* 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/