Statalist


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

st: Mean with confidence intervals for a collapsed data set


From   "Johan Hellstrom" <[email protected]>
To   <[email protected]>
Subject   st: Mean with confidence intervals for a collapsed data set
Date   Fri, 24 Jul 2009 16:42:25 +0200

Dear Statalisters,

For graphing purposes I want to aggregate a panel data set, from unit to
group level, to get a mean value for each group, each year. Nonetheless, I
would also like to have 95 %-confidence intervals (CI) around the calculated
mean. What is making things a bit complicated is that I need to use
(importance) weights when aggregating the data set.

One way of doing this is by using the 'statsby'-program together with the
'ci'-program, but this does not allows importance weights.

statsby mean=r(mean) upper=r(ub) lower=r(lb), saving("C:\....", replace)
by(group year): ci var

Can anyone suggest a solution to get mean values with confidence intervals
using importance weights in this particular case?

Best,
Johan Hellström



*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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