Statalist


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

st: RE: How to do domain analysis in svy:reg or svy:glm?


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: How to do domain analysis in svy:reg or svy:glm?
Date   Mon, 26 Oct 2009 18:12:39 -0000

I leave all -svy- questions to the savvy, but there's apparently a simple misconception here. 

You can get separate regressions by using -by:- as a prefix command. Expecting -by()- and -over()- to work as options is not surprising if you've ingested graphics syntax, but the logic is different for regressions and the syntax certainly is. 

by <whatever> : <somecommand> 

produces separate results. 

<somecommand>, by(<whatever>) 

produces composite results. At least it should be something like that. 

Nick 
[email protected] 

CHEN HSINJEN

My aim is to do stratified regression analysis while accounting for
the complex sampling design, i.e. to estimate the relationship between
BMI and age, separately in women and men.
However, the "reg" and "glm" commands do not allow "over", or even "by", option.

For example, the following statement is not allowed.

     svy: reg BMI age, over(sex)

Thus, we may want to solve this by using "if":

    svy: reg BMI age if sex == 1 *(for men)
    svy: reg BMI age if sex == 2 *(for women)

But, the problem is, when sex == 2, some strata have only one cluster
(or some clusters have only one observations.) And then, the S.E. is
not estimated by stata.

How can I get unbiased estimate of regression coefficient and its S.E.
under this circumstance?
Is this solvable in 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