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]

[edited title] Re: st: dividing values of a column with other values of the same column


From   Nick Cox <njcoxstata@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   [edited title] Re: st: dividing values of a column with other values of the same column
Date   Wed, 6 Feb 2013 08:43:45 +0000

Please show realistic data and what command you tried.

Nick

On Wed, Feb 6, 2013 at 12:59 AM, Tzaloupas Dimitrov
<tzaloupas1232@yahoo.gr> wrote:
> Well done Nick!It works!!!!!!
>
> I want to ask something else
>
> Having applied your code, my matrix becomes
>
>   Country          overall         specific            dates                              values    new variable
>  DD                         gg           0             01/11/2001                               5                 x1
>  DD                        gg           zz           01/11/2001                               15                 x1
> DD                         gg           0             01/12/2001                               2                  x2
> DD                        gg           zz           01/12/2001                               15                  x2
> DD                         gg           0             01/01/2002                               3                 x3
> DD                        gg           zz           01/11/2002                               15               x3
> EE                          gg           0             01/11/2001                               0.5           x3
> EE                          gg           zz           01/11/2001                               25             x3
>   EE                          gg           0             01/12/2001                               0.2         x3
>   EE                          gg           zz           01/12/2001                               122           x3
>
> I want to plot this new variable for each country using xtline but now my matrix in not in a very nice order
>
> Is there a way to plot this new variable over time for each country?
>
> Many thanks NIck
>
Nick Cox <njcoxstata@gmail.com>

> Please try my code. If it doesn't work with your data, try to think
> out why not.
>
> Then please read my paper.
>
> If it's not accessible to you, then this paper will be
>
> SJ-2-1  pr0004  . . . . . . . . . . Speaking Stata:  How to move step by: step
>         . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .  N. J. Cox
>         Q1/02   SJ 2(1):86--102                                  (no commands)
>         explains the use of the by varlist : construct to tackle
>         a variety of problems with group structure, ranging from
>         simple calculations for each of several groups to more
>         advanced manipulations that use the built-in _n and _N
>
> http://www.stata-journal.com/sjpdf.html?articlenum=pr0004
>
> By the way, the official Harvard archives show that Statalist
> archiving software just can't cope with Greek characters: see
>
> http://hsphsun3.harvard.edu/cgi-bin/lwgate/STATALIST/archives/statalist.1302/Author/article-127.html
>
> If you can find a way to suppress the Greek characters, your posts
> will be easier to read for most Statalist members.
>
> Nick
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


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