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

From |
Steven Samuels <sjhsamuels@earthlink.net> |

To |
statalist@hsphsun2.harvard.edu |

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

Date |
Tue, 7 Oct 2008 10:02:26 -0400 |

Leonor-

Consider the following 2 x 2 table with n=50 for pension =1 Participate 1 0 Total Males 5 15 20 Females 10 20 30 Total 15 35 50 This translate into the following table of proportions: Participate 1 0 Total Males .1 .3 .4 Females .2 .4 .6 Total .3 .7 1.0

-Steve On Oct 7, 2008, at 5:13 AM, Martin Weiss wrote:

Just out of curiosity. Why not: -proportion male female ifparticipating ==1 & pension == 1- and compare the resulting CIs? The -if- statementrecordswhat is common to both groups, namely that they participate andthat theydraw a pension. HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of LeonorSaraviaSent: 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_m1mean 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! :) LeonorThank you so much Austin!..... This has been very helpful... Iappreciate itRegards 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, atreatmentgroup and a control group. I have managed to test whether the meanof eachtest scores is different among the two groups using svymean andthen lincomin this way: svy: mean testA, over(treatment) lincom [testA]1-[testA]0 svy: mean testB, over(treatment) lincom [testB]1-[testB]0What I want to do is jointly test whether both variables (testA andtestB)are jointly statistically different among the two groups, butincorporatingthe 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/

* * 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/

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

**st: RE: Comparing means of two variables using -suest-***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**Re: st: 3 Problems in Panel Data Analysis** - Next by Date:
**st: SSC Archive** - Previous by thread:
**st: RE: Comparing means of two variables using -suest-** - Next by thread:
**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 |