Statalist


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

Re: st: svy and pweight postestimation tools


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   Re: st: svy and pweight postestimation tools
Date   Sun, 23 Nov 2008 11:56:46 -0500

Joao, You are right. -predict- with a -residuals- option does not work after -svy: logistic-. I misread the -help- for logistic post- estimation. About Carissa's note concerning design efects (DEFF's):

The strata and PSUs, when analyzed separately, provide design
 effects almost equal to 1 so the effects in my model are almost
entirely from the weighting. So, I
could get results -except for standard errors - using just the weights.

I'm not sure what she means. I would guess that she ignored the sample weights and computed standard errors based only on clusters and strata. However the unweighted estimates are likely to be biased, so I doubt the relevance of the DEFF calculations. I think the proper approach to assessing the contribution of strata and clustering to DEFFS would be to start with weights, clusters and strata, and then drop the strata and cluster specifications. I have seen trade-offs in which clustering increased standard errors, offset by stratification which reduced them. Moreover, DEFFs can vary by model, outcome, predictor, and sub-population. Most samplers would trim sample weights to reduce mean square error, or ignore them in some cases, so generalizations are difficult (See Korn and Graubard, Analysis of Health Surveys, Wiley, 1999, section 4.4

Carissa is correct in this regard: estimates of coefficients or of population parameters depend only on the weights. However this is independent of the DEFFs which ignore the weights. This is the basis for my suggestion that she use -logistic- to compute ROC curves.

Note that Carissa can compute residuals for herself, starting with the linear -xb- predictor and following formulas in the Stata 9 manual for logistic postestimation, page 90 The discussion starting on page 105 in Korn and Graubard may also be helpful.

One amendment to my advice: The -linktest- that I showed may be of limited usefulness to Carissa. -linktest- works best when some covariates are continuous, but most of Carissa's are categorical.


On Nov 23, 2008, at 9:42 AM, Joao Ricardo F. Lima wrote:

Dear Steve,

I think that the option -predicit- with -residuals- is not valid in
Stata 10.1 too.

*****begin example*******
webuse nhanes2f
svyset psuid [pweight=finalwgt], strata(stratid)
svy: logistic  diabetes sex race age
predict r, residuals
******end example*******

Please Steve, what is your opinion about her note:

"(Note: The strata and PSUs, when analyzed separately, provide design
 effects almost equal to 1 so the effects in my model are almost
entirely from the weighting. So, I
could get results -except for standard errors - using just the weights.)"

This make sense for you?

Thanx and Best Regards,

Joao Lima




2008/11/22 Steven Samuels <[email protected]>:
--

Carissa:

-help logistic postestimation- will show you which commands are available after -svy: logistic-. The -esttat clas- command is not one of them in Stata 9 or 10. -predict- with a -residuals- option is valid in Stata 10.1 but not in Stata 9. You _can_ compute your own weighted survey - linktest-
of fit.

predict hat, xb
gen hat2 = hat*hat
svy: logistic aepart hat hat2 //link test is the significance of phat2

You can also construct ROC Curves. Use -logistic- with fweights, the survey
weights rounded to the nearest integer.  See the thread at:
http://www.stata.com/statalist/archive/2007-08/msg00739.html#_jmp0_ .

-Steve


On Nov 21, 2008, at 11:45 AM, Carissa Moffat Miller wrote:


StataList:

I am conducting logistic regression for a complex survey design using Stata version 9. I have found in your past discussions and the user manuals that many postestimation tests are not appropriate with svy commands. I have not found discussion on classification tables and residuals and have been unable to get the following commands to work either with an svy command or
by just using the pweights in Stata.

I have been able to get these to work in another software program using the weights, but I'm concerned it isn't appropriately applied. Can someone tell me: 1) if these tests are appropriate with complex survey data or just pweights, and 2) if so,what are the commands or where would I find them? or
3) if not appropriate, a reference I might cite?

(Note: The strata and PSUs, when analyzed separately, provide design
effects almost equal to
1 so the effects in my model are almost entirely from the weighting. So, I could get results -except for standard errors - using just the weights.)

Cheers, Carissa


Syntax and error messages:

svyset APSU [pweight=FAWT], strata (ASTRATUM)
xi: svy: logistic aepart i.agecat i.Incomequ i.HIGHEDUC employed female
urban

estat clas

{ERROR}: invalid subcommand clas

predict r, residuals
summarize r, detail

{ERROR}: option residuals not allowed



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

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




--
----------------------------------------
Joao Ricardo Lima, D.Sc.
Professor
UFPB-CCA-DCFS
Fone: +553138923914
Skype: joao_ricardo_lima
----------------------------------------
*
*   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/

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