Statalist The Stata Listserver


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

Re: st: RE: loglinear models and survey data


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: RE: loglinear models and survey data
Date   Mon, 6 Mar 2006 19:19:21 -0500

Brian wants to know how to handle non-integer weights in the contract
statement.
The survey programs need the sum of the weights for each grouped
obserrvation
In a separate step, create the SUM of the weights within each cross-tab
group:

e.g.

egen new_wt=sum(analwt_c), by( cigever alcever mjever)
tempfile t1
keep cigever alcever mjever new_wt
sort cigever alcever mjever
save `t1', replace

use original data
contract cigever alcever mjever, freq(count)


sort cigever alcever mjever
merge  cigever alcever mjever using `t1'   // or see neat ado file
"mmerge"
tab _merge

drop _merge
save.....

Now run svy poisson

However, note that svy poisson does not do multinomial log-linear
modeling, but weights with Poisson weights.  So these are not quite the
same as you would get  with a standard log-linear model program, but
the differences between log-likelihoods should be similar..  See "ipf"
by J. Mander, which states that it uses a multinomial weighting.

Steve Samuels




Only fweights are allowed qua weights. But you
can specify non-integer variables, even string
variables, in the varlist.

If pweights are not constant within cells
of your cross-classification, what happens
in terms of the -glm- call?

Nick
[email protected]

Brian P. Flaherty

  > > I think that -contract- leading to -glm- is indeed the
  > > best route. One of the details of -contract-, the -zero-
  > > option, was included with this very task in mind.
  >


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