Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: lincom & svy: mean


From   Steven Samuels <sjhsamuels@earthlink.net>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: lincom & svy: mean
Date   Mon, 10 Mar 2008 17:43:54 -0400

--

Mathew-
Create dummy variables for your groups and use -svy: reg- to estimate the means. The [ ] syntax is used for multi-response model. You could also use -svy: mean- and access the e(b) matrix, but this method is simpler to me.

-Steven

/*******************************/
sysuse auto,clear
svyset _n
tab foreign, gen xfor
sum xfor*
svy: reg mpg xfor*, nocons
lincom xfor1-xfor2
drop xfor*
/*********************************/
On Mar 10, 2008, at 2:03 PM, mathew.stalker@dotecon.com wrote:



I want to perform a weighted t-test, I use to use:

svyset [pw=myweight]
svy : mean myvar , over(mygroup)
lincom [myvar]1-[myvar]0


However, in Stata 10 I now receive the error - [1] not found after lincom.
Can anybody tell be how to refer to the two groups in lincom?


Thanks in advance.] sy

Mathew

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