Hello Statalist,

I'm new to using the -svy- commands and I am trying to construct trend graphs with confidence intervals that take into account the complex survey design. Whereas typically, I would have used twoway (rcap) and twoway (line) and repeat for ~ 4 groups, since I need to account for the survey design, I am using the following instead.

Code:
svyset [pweight=poolwt],  strata(varstr) psu(varpsu)  

svy: mean qty, over(year)
This produces the following output.
Code:
--------------------------------------------------------------
             |             Linearized
        Over |       Mean   Std. Err.     [95% Conf. Interval]
-------------+------------------------------------------------
qty          |
        2007 |   139.2986   2.012716      135.3455    143.2517
        2008 |   176.8884   5.057833      166.9546    186.8223
        2009 |   195.9715   5.236264      185.6872    206.2558
        2010 |   217.3776   4.675099      208.1955    226.5597
        2011 |   265.5767   10.75066      244.4619    286.6915
--------------------------------------------------------------
when I run this with -return list- I find that the matrix is part of the rclass information. How do I extract the mean and confidence interval so that I can use the twoway (rcap) and twoway (line) to plot the results?

Alternately, would there be a more efficient way? I am also new to marginsplot but it seems to be a command used after a regression and furthermore, is there a way to specify the confidence intervals and plot multiple lines and confidence intervals within 1 graph like I can with twoway?

Essentially, I would run the following and save those means and CI's as well, then plot all the different lines on 1 graph

Code:
svy: mean qty_2, over(year)
Thank you in advance.