1\name{psrsq}
2\alias{psrsq}
3%- Also NEED an '\alias' for EACH other topic documented here.
4\title{
5Pseudo-Rsquareds
6}
7\description{
8Compute the Nagelkerke and Cox--Snell pseudo-rsquared statistics, primarily for logistic regression. A generic function with methods for \code{glm} and \code{\link{svyglm}}.  The method for \code{svyglm} objects uses the design-based estimators described by Lumley (2017)
9}
10\usage{
11psrsq(object, method = c("Cox-Snell", "Nagelkerke"), ...)
12}
13%- maybe also 'usage' for other objects documented here.
14\arguments{
15  \item{object}{
16A regression model (\code{glm} or \code{svyglm})
17}
18  \item{method}{
19Which statistic to compute
20}
21  \item{\dots}{
22For future expansion
23}
24}
25
26\value{
27Numeric value
28}
29\references{
30Lumley T (2017) "Pseudo-R2 statistics under complex sampling" Australian and New Zealand Journal of Statistics DOI: 10.1111/anzs.12187 (preprint: \url{https://arxiv.org/abs/1701.07745})
31}
32
33\seealso{
34\code{\link{AIC.svyglm}}
35}
36\examples{
37data(api)
38dclus2<-svydesign(id=~dnum+snum, weights=~pw, data=apiclus2)
39
40model1<-svyglm(I(sch.wide=="Yes")~ell+meals+mobility+as.numeric(stype),
41     design=dclus2, family=quasibinomial())
42
43psrsq(model1, type="Nagelkerke")
44
45}
46% Add one or more standard keywords, see file 'KEYWORDS' in the
47% R documentation directory.
48\keyword{survey }% use one of  RShowDoc("KEYWORDS")
49\keyword{regression }% __ONLY ONE__ keyword per line
50