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   r.a.nobel@umail.leidenuniv.nl
To   statalist@hsphsun2.harvard.edu
Subject   RE: st: specifying marker labels in twoway scatter
Date   Tue, 3 May 2011 23:15:41 +0200

Thank you very much, that was exactly what I was referring to,

regards Alex



Citeren Nick Cox <n.j.cox@durham.ac.uk>:

> Here's another way to get that row vector in Stata.
>
> numlist "1/100"
> local numlist `r(numlist)'
> local numlist : subinstr local numlist " " ",", all
> matrix b = (`numlist')
> Nick
> n.j.cox@durham.ac.uk
>
>
> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu
> [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox
> Sent: 03 May 2011 19:41
> To: 'statalist@hsphsun2.harvard.edu'
> Subject: RE: st: specifying marker labels in twoway scatter
>
> 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/
>
> *
> *   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/


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