Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: weight option

From   tashi lama <>
To   <>
Subject   st: weight option
Date   Thu, 23 Aug 2012 19:32:20 +0000

 Hello all, 

The problem is creating a market share of analysts based on the readership views but also that take into account how many documents were published by the analysts. For instance the guy with 20 views on just 2 documents published should have higher market share than the guy who has 25 views on 5 documents published. Say for instance my dataset would look something like this

          analyst   doc_published   hits 
  |       A          5          25 |
  |       B          3          20 |
   |       C          1          18 |
   |       D          2          20 |
  |       E          4          12 |

If I were to draw a pie chart, I would simply do 
graph pie hits, over(analyst) 
This will indeed give me a nice looking pie chart but this doesn't take document published (which is in column 2) into account. However, I want to be able to create a market share of analysts' based on readership hits but also takes document published into account. I have a feeling it has to do something with [weight] option. Could someone please explain which weight should I use and may be why it would be better than others? 
it could be something like this
graph pie hits [weight=doc_published], over(analyst) 

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index