Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: get est.prop from svyprop


From   "Richard Palmer-Jones" <r.palmer-jones@uea.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: get est.prop from svyprop
Date   Thu, 5 May 2005 10:25:33 +0100

I made a similar inquiry a few weeks ago.
Another way to do this is by:
svytab v1 v2, col se
where v2 is you "by" variable. 
The proportions are in the e(b) matrix and the standard errors are the
square roots of the diagonal in e(V). These are not dimensioned as one might
expect but the appropriate cells can be extracted using loops.
For reasons I cannot fathom you get different results in these matrixes if
you leave of the "se" - so  be careful.
Richard

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of R.E. De Hoyos
Sent: Wednesday, May 04, 2005 4:36 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: get est.prop from svyprop

Just to complement Nick's answer. After svymean the results are stored in 
e(b) and you can save them in a matrix for further analysis:

tab myvar, ven(myvar_d)
svymean myvar_d*
mat prop=e(b)

Later you can write -prop[x,y]- to use a particular proportion. You can also

save other results like the SE and deff statistic. Type -ereturn list- 
after -svymean- to see the macros saved in Stata's temp memory.

Rafa



----- Original Message ----- 
From: "Nick Winter" <nw53@cornell.edu>
To: <statalist@hsphsun2.harvard.edu>
Sent: Wednesday, May 04, 2005 4:08 PM
Subject: Re: st: get est.prop from svyprop


> In Stata 9, "svy: proportion" is e-class and returns the results in e(b)
>
> In Stata 8, you can create a set of dummy variables for the categories, 
> and use -svymean- to get teh proportions:
>
>   . tab myvar, gen(myvar_)
>   . svymean myvar_*
>
> --Nick Winter
>
>
> At 03:21 PM 5/4/2005 +0100, you wrote:
>>Hello all,
>>
>>after using the svyprop command I would like to use the estimated 
>>proportions
>>from svyprop for further analysis/modeling. I couldn't find a possibility 
>>to
>>store the results in an new data file and I am wondering if I missed 
>>something
>>out. As I have many by groups writing down the results from the screen and
>>input them into a new file is not really an option for me. Does anyone 
>>have a
>>suggestion how to get on here or any other possibilities/commands which 
>>would
>>allow me to do this job?
>>
>>Thank you,
>>Markus
>>*
>>*   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/
>
> --------------------------------------------------------
> Nicholas Winter                           607.255.8819 t
> Assistant Professor                       607.255.4530 f
> Department of Government              nw53@cornell.edu e
> 308 White Hall            falcon.arts.cornell.edu/nw53 w
> Cornell University
> Ithaca, NY 14853-4601
>
> *
> *   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/
> 
*
*   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/


*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index