Statalist


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

st: RE: Basic Matrix Definition Question


From   "Daniel Waxman" <[email protected]>
To   <[email protected]>
Subject   st: RE: Basic Matrix Definition Question
Date   Mon, 15 Oct 2007 14:16:16 -0400

I'm no matrix expert, but there is a logical problem here.

You define x and y as variables and they can take on a different value for
each observation (although you are giving them the same value for each
observation in your example).

so it is unclear which values of x and y your matrix command would use.

. display x 

Gives you the value of x in the first observation (although it is unclear to
me why Stata lets you do this).

Perhaps what you need are local macros?

. local x 1
. local y 1
. matrix byvar = (`x',`y')


Daniel
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.488 / Virus Database: 269.14.11/1071 - Release Date: 10/15/2007
6:48 AM
 

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