svyqqplot.RdQuantile-quantile plots either against a specified distribution function or comparing two variables from the same or different designs.
svyqqplot(formula, design, designx = NULL, na.rm = TRUE, qrule = "hf8",
xlab = NULL, ylab = NULL, ...)
svyqqmath(x, design, null=qnorm, na.rm=TRUE, xlab="Expected",ylab="Observed",...)A one-sided formula for svyqqmath or a two-sided formula for svyqqplot
Survey design object to look up variables
Survey design object to look up the RHS variable in svyqqplot, if
different from the LHS variable
Quantile function to compare the data quantiles to
Remove missing values
How to define quantiles for svyqqplot -- see
svyquantile for possible values
Passed to plot. For svyqqplot, if these are NULL
they are replaced by the variable names
Graphical options to be passed to plot
None
data(api)
dstrat<-svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat,
fpc=~fpc)
svyqqmath(~api99, design=dstrat)
svyqqplot(api00~api99, design=dstrat)
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
opar<-par(mfrow=c(1,2))
## sample distributions very different
qqplot(apiclus1$enroll, apistrat$enroll); abline(0,1)
## estimated population distributions much more similar
svyqqplot(enroll~enroll, design=dstrat,designx=dclus1,qrule=survey:::qrule_hf8); abline(0,1)
par(opar)