In the case of frequency weights, a prior
=expand- is presumably another possibility.
Of course, this changes your dataset, but
since -statsby- is going to change it too, that
itself is secondary. More importantly, the
dataset might become very large; and even
more importantly, this technique doesn't
help with non-frequency weights. I guess
Jeff may be able to think of other disadvantages.
Nick
[email protected]
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]]On Behalf Of
> Jeff Pitblado,
> StataCorp LP
> Sent: 25 March 2004 19:08
> To: [email protected]
> Subject: Re: st: Statsby and weights
>
>
>
> Dale Plummer <[email protected]> asks about using
> weights with
> -statsby-:
>
> > I may have overlooked something obvious, but I cannot see why the
> > statsby command will not allow weights in the commands it
> is executing.
> > Would someone please explain this?
>
> There really isn't a good reason for this. From a
> development point of view,
> -statsby- uses the same parsing engine as -bootstrap-,
> -jknife-, -simulate-,
> and -permute-; some of which require careful consideration
> (and new code) to
> handle weights.
>
> There are ways around this. The long way is to set up
> -postfile- and use
> -post- within a -forvalues- loop. This requires a decent
> amount of coding to
> reproduce some of the features of -statsby-.
>
> The short way, involves tricking -statsby-. I generally
> would warn users
> against trying to "trick" a command to do something that a
> developer purposely
> tried to prevent, but this is one of those special cases.
>
*
* 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/