Statalist


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

RE: st: Multiple mean comparisons with complex survey design - Richard


From   Richard Williams <Richard.A.Williams.5@ND.edu>
To   statalist@hsphsun2.harvard.edu, <statalist@hsphsun2.harvard.edu>
Subject   RE: st: Multiple mean comparisons with complex survey design - Richard
Date   Tue, 19 Feb 2008 17:41:33 -0500

At 04:22 PM 2/19/2008, Sven Klingemann wrote:
Hm, just noticed that as well ... guess this has not solved the problem
quite yet ...
It isn't pretty, but I think code along these lines gives you what you want.

webuse nhanes2f, clear
tab race, gen(race)
local ngroups = r(r)
local ngm1 = `ngroups' - 1
local ncontrasts = `ngroups' * (`ngroups' - 1) / 2
svy: reg health race1 race2 race3, nocons
forval i = 1/`ngm1' {
forval j = 2 /`ngroups' {
test race`i' = race`j'
display r(p) * `ncontrasts'
}
}

If prettiness is important, you could probably build matrices with the results and then display them.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME: (574)289-5227
EMAIL: Richard.A.Williams.5@ND.Edu
WWW: http://www.nd.edu/~rwilliam

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