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, is already up and running.

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

st: Count multiple observations / weight in Scatter

From   "Rilke Rainer Michael" <>
To   <>
Subject   st: Count multiple observations / weight in Scatter
Date   Fri, 17 Sep 2010 10:52:49 +0200

Dear Statalist-Readers,

I am searching quite a while for a specific problem and I am not sure if there exists a proper work-around.

I have data where for example one subject indicates two different variables, lets say X and Y. 

Id            X            Y
1             10           19
2             12           19
3             10           19

I now want to create a variable lets say freq which counts the number of multiple duplicate observation. I don't know if I am expressing myself right, On the basis of the above table it should look like this:

Id            X            Y             count
1             10           19           2
2             12           19           1
3             10           19           2

In the end the count variable will serve as an weight for this observations in a scatter plot. By doing this the dot size in the scatterplot will increase. Maybe someone can help me with this little problem.

Kind Regards,

Dipl.-Vw. Rainer Michael Rilke

Department of Corporate Development and Business Ethics
University of Cologne
Albertus-Magnus-Platz | 50923 Köln, Germany
Tel: +49 (0) 221 470 1843 | Fax: +49 (0) 221 470 1849 |

*   For searches and help try:

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