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

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: Comparing means of two variables using -suest- |

Date |
Tue, 7 Oct 2008 11:13:03 +0200 |

Just out of curiosity. Why not: -proportion male female if participating == 1 & pension == 1- and compare the resulting CIs? The -if- statement records what is common to both groups, namely that they participate and that they draw a pension. HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Leonor Saravia Sent: Tuesday, October 07, 2008 10:08 AM To: statalist@hsphsun2.harvard.edu Subject: st: Comparing means of two variables using -suest- Hello, IŽd like to compare two means of two different groups (dummy variables), where each one is affected by a grouping variable. I was looking in the Stata FAQS and found that this was posible with the - suest - command, but when I use it, it doesnŽt work and I donŽt know whatŽs wrong. IŽappreciate if you could give me some advice. My dummy variables are like this: act_m = (participating == 1 & male == 1) ; 0 otherwise act_f = (participating == 1 & female == 1) ; 0 otherwise pension = 1 if recieves a pension; 0 otherwise And I need to compare the 'act_m' mean when 'pension' == 1 with the mean of 'act_f' when 'pension' == 1. What I was doing was (and didnŽt work): svyset folio [pw = factor] mean act_m if (hm3_hym == 1 & menor15h == 1) [fw = factorex], over(pension) est store act_m1 mean act_f if (hm3_hym == 1 & menor15h == 1) [fw = factorex], over(pension) est sto act_f1 suest act_m1 act_f1,svy test [act_m1]pensionh [act_h1]pensionh The error that Stata brings is: suest act_m1 act_h1,svy unable to generate scores for model act_m1 suest requires that predict allow the score option r(322); Well, IŽd appreciate very much your help! :) Leonor Thank you so much Austin!..... This has been very helpful... I appreciate it Regards Renato On Feb 24 2008, Austin Nichols wrote: Renato <ravi0023@umn.edu>: Try -suest- e.g. sysuse auto svyset [pw=wei] qui svy: reg len for est sto length qui svy: reg turn for est sto turn qui svy: reg tru for est sto trunk suest length turn trunk, svy test [length]foreign [turn]foreign [trunk]foreign On 23 Feb 2008 16:34:29 -0600, <ravi0023@umn.edu> wrote: I have a data base with 2 different test scores and two groups, a treatment group and a control group. I have managed to test whether the mean of each test scores is different among the two groups using svymean and then lincom in this way: svy: mean testA, over(treatment) lincom [testA]1-[testA]0 svy: mean testB, over(treatment) lincom [testB]1-[testB]0 What I want to do is jointly test whether both variables (testA and testB) are jointly statistically different among the two groups, but incorporating the sample design in my estimation. * * 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/ * * 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/

**Follow-Ups**:**Re: st: RE: Comparing means of two variables using -suest-***From:*Steven Samuels <sjhsamuels@earthlink.net>

**References**:**st: Comparing means of two variables using -suest-***From:*"Leonor Saravia" <lmisaravia@gmail.com>

- Prev by Date:
**st: Comparing means of two variables using -suest-** - Next by Date:
**Re: st: -strel- syntax problems...** - Previous by thread:
**st: Comparing means of two variables using -suest-** - Next by thread:
**Re: st: RE: Comparing means of two variables using -suest-** - Index(es):

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