Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

RE: st: specifying marker labels in twoway scatter


From   Nick Cox <n.j.cox@durham.ac.uk>
To   "'statalist@hsphsun2.harvard.edu'" <statalist@hsphsun2.harvard.edu>
Subject   RE: st: specifying marker labels in twoway scatter
Date   Tue, 3 May 2011 19:40:47 +0100

That creates a row vector with values 1(1)100. 

The nearest equivalent could be something like 

matrix a = J(1,100,1)

forval j = 1/100 {
	matrix a[1,`j'] = `j'
}

except that I am rusty on Stata matrices. 

Or perhaps you want 100 variables, 1 observation, with values 1..100. 

set obs 1
forval j = 1/100 { 
	gen a`j' = `j'
} 

Or perhaps you don't mean what you say. 

Nick 
n.j.cox@durham.ac.uk 


r.a.nobel@umail.leidenuniv.nl

Is there an equivalent to Mata's A=(1..100) in 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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index