Path to this page:
./
math/Rsurvey,
Analysis of complex survey samples
Branch: CURRENT,
Version: 4.2.1,
Package name: Rsurvey4.2.1,
Maintainer: pkgsrcusersSummary statistics, twosample tests, rank tests, generalised linear
models, cumulative link models, Cox models, loglinear models, and
general maximum pseudolikelihood estimation for multistage stratified,
clustersampled, unequally weighted survey samples. Variances by
Taylor series linearisation or replicate weights. Poststratification,
calibration, and raking. Twophase subsampling designs. Graphics. PPS
sampling without replacement. Principal components, factor analysis.
Required to run:[
math/R] [
math/Rminqa] [
math/RnumDeriv] [
math/Rmitools]
Required to build:[
pkgtools/cwrappers]
Master sites: (Expand)
Version history: (Expand)
 (20230602) Updated to version: Rsurvey4.2.1
 (20210920) Updated to version: Rsurvey4.1.1
 (20190731) Package added to pkgsrc.se, version Rsurvey3.36 (created)
CVS history: (Expand)
20230602 15:42:34 by Makoto Fujiwara  Files touched by this commit (2) 
Log message:
(math/Rsurvey) Updated 4.1.1 to 4.2.1
Following lines from inst/NEWS
4.2 Handling of influence functions has CHANGED. A function that supplies influence
functions must supply one for every observation it was given in its input:
use 0 for observations removed by subsetting. (for Guilherme Jacob)
regTermTest(method="LRT") required the two models to use the same \
observations
(of course), but didn't check, so IT WAS WRONG.
It now subsets properly. (for Keiran Shao)
This will probably be the *last* interpretedRonly version of survey. Future
versions will likely incorporate C++ code for faster variance computation and
for smallarea estimation.
deffs in svyglm.svyrep.design (Ben Schneider)
svynls() allows for prior (eg precision) weights (for Gary Nelson)
improved names in svyquantile.svyrep.design (Ben Schneider)
trimWeights() could get into an infinite recursion (Ingmar Sturm)
data(myco) from Rao, Scott, and Skinner (originally from Clayton & Hills)
as.svrepdesign now throws an error with poststratified/raked/calibrated
designs  create replicates *first*, then calibrate (for Lauren Kennedy)
trimWeights now works with replicateweights designs
score tests for svyglm (with Keiran Shao)
svyby(), and thus svyboxplot(), didn't handle the new quantile functions
correctly when standard error/ci weren't requested (Stephanie Zimmer, Raymond Pan)
svycontrast() threw an error on the output of svyby() with return.replicates=TRUE
(Alena Stern)
Fix regTermTest for svycoxph for the methods lookup changes in R 4.0
(and consequential change to marginpred)
We don't provide model.matrix.svycoxph any more;use the inherited
survival:::model.matrix.coxph
Recent survival::coxph() switches to robust variances with noninteger weights
so check for model$naive.var before model$var
Disable the passthrough from predict.svycoxph to predict.coxph for \
type="expected"
(Bryan Shepherd)
svyby( svyvar) would throw an error on domains with only one observation
(for Dirk Schumacher)
svyvar() computes sample size 'n' in the same way for na.rm=TRUE as for a domain
(for Raymond Pan)
xdesign() for crossed designs (which aren't strictly surveys, but are basically \
similar)
removed redundant loop in saddlepoint approximation to pchisqsum (Qiaolan Deng)
fix in summary(svyivreg) for variances (Chandler McClellan)
svyolr() didn't run for subsets of raked/calibrated designs (Antony Damico)
add predict.svyolr (for Vincent ArelBundock)
add anova.svycoxph (for Bryan Shepherd)
add stringsToFactors=TRUE to svyby to ensure factors have same levels in domains
(for various people including Stephanie Zimmer)
more complicated svyby example in ?svycontrast
svyranktest() gave an error for multiple groups with replicate weights (Kasuki \
Yoshida)
Additional chisquared test for tables with zeros (CrossValidated question #571328)
svydesign() has a 'calibrate.formula' option to tell R that your weights have
already been calibrated/raked/poststratified (for Tobias Schoch)
svycontrast() didn't work on svrepglm objects without replicates (Thomas Loughlin)
error in svycoxph with rescale=FALSE (Jing Zhang)
error in vcov.svyrep.design with mse=TRUE (shows up in svyVGAM)
svyquantile() didn't pay attention to interval_type for replicate weights \
(David Jorquera Petersen)
svyquantile() qrules 5 to 9 now return the single data value when there's
just one (David Jorquera Petersen)
regTermTest() on svyolr() objects created in a function now finds the
design object more reliably. (for Pedro Baldoni)
regTermTest() will now test against null models in svycoxph()
Fixes to svyquantile: https://github.com/bschneidr/rforgesurveymirror/pull/7
(Ben Schneider)
anova.svyloglin was broken by change to anova.glm(test=NULL)
(Brian Ripley)
Onesample svyttest() on logical variable now tests for P(TRUE==0) not P(FALSE==0)
(Stephanie Zimmer)
rename svykm.fit to svykm_fit because CRAN tests

20211026 12:56:13 by Nia Alarie  Files touched by this commit (458) 
Log message:
math: Replace RMD160 checksums with BLAKE2s checksums
All checksums have been doublechecked against existing RMD160 and
SHA512 hashes

20211007 16:28:36 by Nia Alarie  Files touched by this commit (458) 
Log message:
math: Remove SHA1 hashes for distfiles

20210920 02:49:49 by Makoto Fujiwara  Files touched by this commit (2) 
Log message:
(math/Rsurvey) Updated 3.36 to 4.1.1
4.11 CRAN
4.1 svyquantile() has been COMPLETELY REWRITTEN. The old version is available
as oldsvyquantile() (for David Eduardo Jorquera Petersen)
svycontrast()'s improvements for statistics with replicates are now also there with
svyby(), for domain comparisons (Robert Baskin)
svyttest() now gives an error message if the binary group variable isn't binary
(for StackOverflow 60930323)
confint.svyglm Waldtype intervals now correctly label the columns (eg 2.5%, 97.5%)
(for Molly Petersen)
svyolr() using linearisation had the wrong standard errors for intercepts
other than the first, if extracted using vcov (it was correct in summary() output)
svyglm() gave deffs that were too large by a factor of nrow(design). (Adrianne \
Bradford)
svycoxph() now warns if you try to use frailty or other penalised terms, \
because they
just come from calling coxph and I have no reason to believe they work correctly
in complex samples (for Claudia Rivera)
coef.svyglm() now has a complete= argument to match coef.default(). (for Thomas \
Leeper)
summary.svyglm() now gives NA pvalues and a warning, rather than Inf standard \
errors,
when the residual df are zero or negative (for Dan Simpson and Lauren Kennedy)
In the multigroup case, svyranktest() now documents which elements of the 'htest'
object have which parts of the result, because it's a bit weird (for Justin Allen)
svycontrast() gets a new argument add=TRUE to keep the old coefficients as well
twophase() can now take strata= arguments that are character, not just factor
or numeric. (for Pam Shaw)
add reference to Chen & Lumley on tail probabilities for quadratic forms.
add reference to Breslow et al for calibrate()
add svyqqplot and svyqqmath for quantilequantile plots
SE.svyby would grab confidence interval limits instead of SEs if \
vartype=c("ci","se").
svylogrank(method="small") was wrong (though method="score" \
and method="large" are ok),
because of problems in obtaining the atrisk matrix from coxph.detail. (for \
Zhiwen Yao)
added as.svrepdesign.svyimputationList and withReplicates.svyimputationList
(for Ángel Rodríguez Laso)
logLik.svyglm used to return the deviance and now divides it by 2
svybys() to make multiple tables by separate variables rather than a joint table
(for Hannah Evans)
added predictat= option to svypredmeans for Steven Johnston.
Fixed bug in postStratify.svyrep.design, was reweighting all reps the same \
(Steven Johnston)
Fix date for Thomas & Rao (1987) (Neil Diamond)
Add svygofchisq() for onesample chisquared goodness of fit (for Natalie Gallagher)
confint.svyglm(method="Wald") now uses t distribution with design df \
by default.
(for Ehsan Karim)
confint.svyglm() checks for zero/negative degrees of freedom
confint.svyglm() checks for zero/negative degrees of freedom
mrb bootstrap now doesn't throw an error when there's a single PSU in a stratum
(Steve White)
oldsvyquantile() bug with producing replicateweight confidence intervals for
multiple quantiles (Ben Schneider)
regTermTest(,method="LRT") didn't work if the survey design object \
and model were
defined in a function (for Keiran Shao)
svyglm() has clearer error message when the subset= argument contains NAs (for \
Pam Shaw)
and when the weights contain NAs (for Paige Johnson)
regTermTest was dropping the first term for coxph() models (Adam Elder)
svydesign() is much faster for very large datasets with character ids or strata.
svyglm() now works with na.action=na.exclude (for Terry Therneau)
extractAIC.svylm does the designbased AIC for the twoparameter Gaussian model, so
estimating the variance parameter as well as the regression parameters.
(for Benmei Liu and Barry Graubard)
svydesign(, pps=poisson_sampling()) for Poisson sampling, and ppscov() for
specifying PPS design with weighted or unweighted covariance of sampling indicators
(for Claudia Rivera Rodriguez)
4.0 Some (and eventually nearly all) functions now return influence functions when
called with a survey.design2 object and the influence=TRUE option. These allow
svyby() to estimate covariances between domains, which could previously only be
done for replicateweight designs, and so allow svycontrast() to do domain contrasts
 svymean, svytotal, svyratio, svymle, svyglm, svykappa
Nonlinear least squares with svynls() now available
Document that predict.svyglm() doesn't use a rescaled residual mean square
to estimate standard errors, and so disagrees with some textbooks. (for Trent \
Buskirk)
3.38 When given a statistic including replicates, svycontrast() now transforms \
the replicates
and calculates the variance, rather than calculating the variance then using the
delta method. Allows geometric means to exactly match SAS/SUDAAN (for Robert \
Baskin)
vcov.svyrep.design to simplify computing variances from replicates (for William \
Pelham)
svykm() no longer throws an error with singleobservation domains (for Guy Cafri)
Documentation for svyglm() specifies that it has always returned
modelrobust standard errors. (for various people wanting to fit relative risk
regression models).
3.37 RODBC database connections are no longer supported.
Use the DBIcompatible 'odbc' package
set scale<1 if it is still NULL after processing, inside svrepdesign()
[https://stats.stackexchange.com/questions/409463]
Added withPV for replicateweight designs [for Tomasz Żółtak]
svyquantile for replicateweight designs now uses a supplied alpha to get
confidence intervals and estimates SE by dividing confidence interval length
by twice abs(qnorm(alpha/2)). [For Klaus Ignacio Lehmann Melendez]
All the svyquantile methods now take account of design degrees of freedom and
use t distributions for confidence intervals. Specify df=Inf to get a Normal.
[For Klaus Ignacio Lehmann Melendez]
svyivreg() for 2stage leastsquares (requires the AER package)
warn when rho= is used with type="BRR" in svrepdesign [for \
Tomasz Żółtak]
Add "ACS" and "successivedifference" to type= in svrepdesign(),
for the American Community Survey weights
Add "JK2" to type= in svrepdesign
Warn when scale, rscales are supplied unnecessarily to svyrepdesign
More explanation of 'symbolically nested' in anova.svyglm
Link to blog post about design df with replicate weights.
Chase 'Encyclopedia of Design Theory' link again.

20190808 21:53:58 by Brook Milligan  Files touched by this commit (189)  
Log message:
Update all R packages to canonical form.
The canonical form [1] of an R package Makefile includes the
following:
 The first stanza includes R_PKGNAME, R_PKGVER, PKGREVISION (as
needed), and CATEGORIES.
 HOMEPAGE is not present but defined in math/R/Makefile.extension to
refer to the CRAN web page describing the package. Other relevant
web pages are often linked from there via the URL field.
This updates all current R packages to this form, which will make
regular updates _much_ easier, especially using pkgtools/R2pkg.
[1] http://mailindex.netbsd.org/techpkg/2019/08/02/msg021711.html
