Statalist The Stata Listserver


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

Re: st: stcox: weighted regression changes the # of observations


From   Michael McCulloch <[email protected]>
To   [email protected]
Subject   Re: st: stcox: weighted regression changes the # of observations
Date   Fri, 01 Dec 2006 09:13:45 -0800

Thank you very much, Jeff, for pointing out what I missed in the documentation.
I understand now what happened in the analysis!


At 09:01 AM 12/1/2006, you wrote:
Michael McCulloch <[email protected]>

> I'm conducting cox regression on a dataset measuring survival after
> treatment. I'm puzzled as to why weighted regression (using -iweight-
> after -stcox-) would show a different # of observations in the output. Here
> are results of the ways I've done the analysis. In each case, I start with
> only 33 subjects.
>
> (output omitted)

As documented in '[U] 11.1.6 weights'

iweights, or importance weights, are weights that indicate the
"importance" of the observation in some vague sense. iweights have no
formal statistical definition; any command that supports iweights will
define exactly how they are treated. In most cases, they are intended
for use by programmers who want to produce a certain computation.

However -iweight-s are usually treated computationally as -fweight-s that are
allowed to take on non-integer values. For commands that have that
interpretation, the sum of the weights is treated as the sample size. I
believe most of Stata's estimation commands that allow -iweight-s (including
-stcox-) are consistent in this regard.

> *Note: I'm using inverse probability of treatment weighting, with the
> following command immediately preceding -stcox-:
> stset datedied [iweight=wt_unst_II]

-bootstrap- is not meant for weighted data. Currently -stcox- with the
-vce(bootstrap)- option does not complain when weights have been -stset, but
it should (we will fix this soon).

> Another anomaly is why the bootstrap option yields a narrower ci95.

Standard errors from the bootstrap are not guaranteed to be larger than
the conventionally computed standard errors.

--Jeff
[email protected]
*
* 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/

Best wishes,
Michael


____________________________________

Michael McCulloch
Pine Street Clinic
Pine Street Foundation
124 Pine Street, San Anselmo, CA 94960-2674
tel     415.407.1357
fax     415.485.1065
email:  [email protected]
web:    www.pinest.org
        www.pinestreetfoundation.org
        www.medepi.net/meta





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