Statalist The Stata Listserver


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

st: RE: weighting item specific (CPI) histograms


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: weighting item specific (CPI) histograms
Date   Tue, 28 Mar 2006 10:45:48 +0100

You don't explain CPI. I guess consumer price index. 
As I understand it, despite a multiplicity of details, 
such indexes are just weighted 
combinations of a bundle of price variables. Stata 
is well up to that, probably using -generate- and possibly
-replace-. 

I am puzzled by this question and am probably missing
something. It seems to me that you should just do
the calculations first and then produce the histogram 
you want. The weights possibilities for histogram, or 
any other kind of Stata graph, are not really intended for 
elaborate calculations on the fly. 

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

Samu Kurri
 
> Is there a way to calculate a weighted (CPI) histogram with STATA? I
> have a very large micro data set and I would like to sum up the
> histograms of price changes in each item groups (eg. 
> gasoline, bananas,
> computers, cell phone calls) to a single weighted CPI 
> histogram. So what
> I need is a command (or a macro or program) that calculates the item
> specific histograms and then weights them up with given item weights.
> 
> Or can I save the histograms as tables (data) (instead of pictures)?
> That would allow me to export them and do the weighting in eg. Excel.
> 
> I am familiar with the fweights option on histogram command, 
> but I think
> it does not suit for my purposes.

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index