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

Re: st: lincom & svy: mean

From   Steven Samuels <>
Subject   Re: st: lincom & svy: mean
Date   Mon, 10 Mar 2008 17:43:54 -0400


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.


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


* For searches and help try:
*   For searches and help try:

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