Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: loglinear models and survey data


From   "Brian P. Flaherty" <[email protected]>
To   [email protected]
Subject   st: loglinear models and survey data
Date   Thu, 29 Sep 2005 12:42:00 -0700

Hello,

First, am a new Stata user and still very much working on all aspects of the language/program.

I am trying to fit loglinear models to some US national data (the NHSDA). The data have weights and sample design variables. I'd like to incorporate both in the analysis. I think I've learned the following:

- to fit a standard loglinear model, use contract to get the count data and then xi: glm to fit the model

(I'm open to correction from the start. If that is wrong or there are better ways to do this, please let me know.)

However, this doesn't include weights or design information. And here are the issues that seem to confront me:

- Ignoring survey design:
The command contract does not seem to be able to include pweights (Is this something I could add to the ado file, being such a new user?)

- Including survey design (svyset):
Can I use svy: poisson on the individual case data? If so, what is the dependent variable? (There is no count variable as in the cross- tabulated data used in glm.)

Or is there a way to use contract in the survey context, have it keep the design variables, and then use svy: poisson on the counts as the dependent variable?

Other ways to do this would be greatly appreciated. Thank you for your time and thoughts.

Brian Flaherty

*
* 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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index