Statalist


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

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


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
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: [email protected]
[mailto:[email protected]] On Behalf Of Leonor Saravia
Sent: Tuesday, October 07, 2008 10:08 AM
To: [email protected]
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 <[email protected]>:
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,  <[email protected]> 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/



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