# svydesign syntax and deviance!

4 messages
Open this post in threaded view
|

## svydesign syntax and deviance!

 This message is for those familiar with the survey package. I need to do regression logistic and choose the best model which explain the impact of the indepndent variables by using AIC,BIC,... > sum.coef<-summary(svyglm(y~x1+x2+x3, design=design, family=quasibinomial(), data=data))\$deviance  is this the correct way for obtaining the deviance. Regards.         [[alternative HTML version deleted]] ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: svydesign syntax and deviance!

 On Sat, 31 Jul 2010, aline uwimana wrote: > This message is for those familiar with the survey package. I need to do regression logistic and choose the best model which explain the impact of the > indepndent variables by using AIC,BIC,... > > > sum.coef<-summary(svyglm(y~x1+x2+x3, design=design, family=quasibinomial(), data=data))\$deviance > >  is this the correct way for obtaining the deviance. You can use the deviance() function to get a number.  This number isn't really the deviance, because svyglm() doesn't use maximum likelihood estimation. It doesn't have a chi-squared distribution, for example.  It is the deviance that would be computed if the weights were precision weights and were rescaled to sum to the sample size. There isn't a real deviance. The reason this number is reported is that, although differences in deviance do not have a chi-squared distribution, they do asymptotically have a known distribution and this gives the Rao-Scott 'working deviance' tests. These tests are widely used for loglinear models but also apply to generalized linear models and the Cox model. The function regTermTest() does Rao-Scott tests with the method="LRT" option.     -thomas Thomas Lumley Professor of Biostatistics University of Washington, Seattle ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.