Page 1 of 1

weighted histogram or distribution graph

Posted: Mon May 27, 2019 10:26 am
by startz
I'd like to be able to make histograms and other distribution graphs, but my observations have survey weights attached. Advice as to how to make graphs that take the weights into account?

Re: weighted histogram or distribution graph

Posted: Tue May 28, 2019 10:47 am
by EViews Glenn
"Survey weights" is ambiguous, but I'm assuming you mean frequency weights or the equivalent...

I hate to be the bearer of bad news but while there are many tasks you might want to do where you can easily do things to approximate frequency weights, the distributions calculations are going to be the toughest.

(Note: we traditionally haven't had much call for frequency weighting; the only place where we have frequency weights built-into our routines calculation is in the computation of GLM estimates.)

For now, the easiest thing to do is to expand the series into a vector with the appropriate observations and then construct your graphs from the vector. I'm not sure from the top-of-my-head the best way to do this, but if you'd like to send a workfile with an example, I'll give it some thought. I'm sure that we can come up with something that works reasonably well for now.