Changes in version 1.7.5 (2026-01-17) - deffCR was revised to allow the possibility that some strata use 1-stage sampling and others use 2-stage. The help page was revised to describe new parameters and the model underlying the Chen-Rust formula for a design effect. Changes in version 1.7 (2025-09-29) - Vignette added for SampStop function. SampStop output revised to include numbers of current respondents and nonrespondents, data for which are inputs to the function. Changes in version 1.6.1 (2025-05-11) - An error trap was added to deffCR to check whether the sample size is less than or equal to the sum of weights in each stratum. If not, the function stops with an error message. Changes in version 1.6 (2025-04-25) - SampStop function added to implement a rule for stopping data collection for a sample based on anticipated amount of change in an estimated mean. Changes in version 1.5 (2024-06-24) - nEdge and nEdgeSRS functions added that compute sample sizes required for the normal approximation to the distribution of an estimator of the population mean to be accurate. nEdge applies to a stratified estimator while nEdgeSRS applies to an estimator of a mean from simple random sampling. - wtd.moments function added that estimates the 2nd, 3rd, and 4th population moments of a single variable. Skewness and kurtosis are also estimated. - quad_roots function added that finds the roots of a quadratic equation. - Minor error checks added to clusOpt2. Changes in version 1.4.3 (2024-03-06) - nPPS function added that computes a sample size for a probability proportional to size, with replacement (ppswr) sample. - unitVar function added that computes the population (unit) variances of a variable. Two alternatives in the output are the unweighted population variance and a unit variance appropriate for ppswr samples. Changes in version 1.4.2 (2023-12-05) - Reduced the size of the MDarea.pop data file in order to meet the CRAN limitation of 5MB for an installed package. The reduced file is called MDarea.popA. The MDarea.pop file used in the book by Valliant, Dever, and Kreuter (2018) can still be downloaded in RData format from https://umd.app.box.com/v/PracTools2ndEdition. - Checks on sum(pp)==1 in BW2stagePPS and BW3stagePPS were changed from exact equality to tolerances on equality. - Various minor edits required for CRAN submission were made. Changes in version 1.4.1 (2023-11-09) - Incorrect calculation of 1-draw selection probabilities corrected in vignette, Distance-and-MOS-PSUs. - Added check that 1-draw selection probabilities in parameter pp sum to 1 in the functions, BW2stagePPS and BW3stagePPs. - Added a new vignette titled "Design Effects and Effective Sample Size". - deffCR output updated to include stratum estimates of rho and coefficients of variation of weights Changes in version 1.4 (2023-05-23) - New functions, CompMOS and GeoMinMOS, added. Edited clusOpt2 to allow vector input for some parameters. Vignette "Selection of Appropriate PracTools Sample Size Function" added. - CompMOS computes a composite measure of size variable for domain-based sampling that accounts for desired sampling rates and anticipated response rates of domain units. - GeoMinMOS takes geographic areas as input, determines whether any are less than a specified minimum measure of size, and combines areas that are too small with other nearby areas. - There are 19 different functions in PracTools for computing sample sizes. The vignette "Selection of Appropriate PracTools Sample Size Function" gives some guidance on how to select a function for different applications. Changes in version 1.3 (2023-03-19) - New functions added are: GeoDistPSU, GeoDistMOS, and nContOpt. BW2stagePPS and BW2stagePPSe updated to handle minor issues with certainty selections. - BW2stagePPS and BW2stagePPSe updated to deal with PSUs whose input selection probability is 1. In BW2stagePPS such PSUs are excluded from calculations, results are produced based on PSUs with pp < 1, and a warning is printed with the number of PSUs that were excluded. In BW2stagePPSe PSUs with pp = 1 are not allowed. If the input contains any PSUs with pp >= 1, the function is halted. These PSUs should be removed before calling BW2stagePPSe. - GeoDistPSU was added that combines geographic units into PSUs based on latitude and longitude of their centroids. A maximum within-PSU distance can be set to control the size of PSUs. - GeoDistMOS is a companion function to GeoDistPSU. Geographic units are formed into PSUs based on latitude and longitude of their centroids as in GeoDistPSU. A maximum within-PSU distance can be set to control the size of PSUs. In addition, a measure of size (MOS) for each PSU is used to limit the maximum MOS allowed for a PSU. - A vignette was also added that describes how to use GeoDistPSU and GeoDistMOS. When the geographic units are in the US, the plot_usmap function in ggplot2 can be used to display a map of the PSUs that were formed. An html version of the vignette can be viewed with vignette("Distance-and-MOS-PSUs", package="PracTools") - nContOpt computes the sample size required to estimate the mean of a continuous variable by optimizing the numbers of take-alls (certainties) and non-take-all units selected by probability sampling. The sample size is based on splitting the sample between take-alls and non-take-alls in a way that achieves either a target coefficient of variation or a target variance for an estimated mean. The sample design for the non-take-alls can be either simple random sampling or probability proportional to size sampling. - Corrected error in BW3stagePPSe. (browser() inadvertently left in function.) Changes in version 1.2.8 (2022-08-17) - nAuditMUS function added for monetary unit sampling in audit applications. nAuditAttr was edited to produce somewhat larger sample sizes. Users will notice a difference from the previous version mainly when the population sizes are small. Changes in version 1.2.7 (2022-06-13) - Edited help file for NRFUopt to better describe contents of the output; removed “Expected total cases (2‐phase)” from output. Edited clusOpt2 to allow only scalar parameter inputs. Changes in version 1.2.5 (2022-01-18) - Corrected error in deffCR in estimation of $\small {{\rho }_{h}}$ for stratified samples. Changes in version 1.2.4 (2021-12-20) - The function nAuditAttr was added to calculate sample sizes for attribute samples in an audit of financial records. Changes in version 1.2.3 (2021-11-03) - Modified BW2stagePPS, BW2stagePPSe, BW2stageSRS, BW3stagePPS, and BW3stagePPSe to not return NA for the SSU variance component when a PSU contains only 1 SSU. - Parameters lonely.SSU and lonely.TSU were added. With the default values of “mean”, any NAs are replaced with the mean of non-missing values. The other allowable value is “zero” in which case any missing value is replaced by 0. - In help files, updated references from sections in VDK (2013) to VDK (2018). Changes in version 1.2.2 (2020-08-03) - Corrected error in v.1.2.1 warning in nContMoe. The warning should be for the combination: moe.sw=2, e >= 1. Changes in version 1.2.1 (2019-10-02) - nContMoe edited to eliminate restriction that parameter e (margin of error) must be less than 1. If moe.sw = 2 and e >= 1, a warning is printed: WARNING: e >= 1. This parameter setting leads to the lower limit of a 2-sided alpha level confidence interval being 0 or less. You may want to adjust the value of e. Changes in version 1.1 (2018-10-21) - A population called ThirdGrade of 2,427 third graders’ math and science scores was added. The data are from the Third International Mathematics and Science Study. - In some applications the NRadjClass function would fail if there were many duplicate values of predicted probabilities generated by the pclass function. pclass was modified to jitter the predictions. Changes in version 0.9 (2018-06-13) - Errors in the help files for CVcalc2 and CVcalc3 corrected. In CVcalc2, parameter descriptions for Wsq and Bsq were corrected. In CVcalc3, parameter description for delta1 was corrected. References to specific sections of Valliant, Dever, and Kreuter (2013) added for details on the formulas used in CVcalc2 and CVcalc3. Typo corrected in help file for NRadjClass. Changes in version 0.8 (2018-01-05) - BW2stagePPSe changed to correct error in second term of between-PSU variance component estimate. The formula used for the between component in v. 0.7 and earlier versions was: [\small {{v}{PSU}}=\frac{1}{m\left( m-1 \right)}\sum\limits{i\in s}{{{\left( \frac{{{{\widehat{t}}}{i\pi }}}{{{p}{i}}}-{{{\widehat{t}}}{pwr}} \right)}^{2}}}-\sum\limits{i\in s}{\frac{1-\pi {i}^{}}{{{\left( \pi _{i}^{} \right)}^{2}}}{{{\widehat{V}}}{i}}} ] where $\small \pi {i}^{*}=m{{p}{i}}$. This estimator is somewhat biased when psu’s are selected with replacement. An approximately unbiased estimator is [\small {{v}{PSU}}=\frac{1}{m\left( m-1 \right)}\sum\limits{i\in s}{{{\left( \frac{{{{\widehat{t}}}{i\pi }}}{{{p}{i}}}-{{{\widehat{t}}}{pwr}} \right)}^{2}}}-\frac{1}{{{m}^{2}}}\sum\limits{i\in s}{\frac{{{{\widehat{V}}}{i}}}{p{i}^{2}}}] Since $\frac{1-\pi {i}^{}}{{{\left( \pi _{i}^{} \right)}^{2}}}=\frac{1}{{{\left( m{{p}{i}} \right)}^{2}}}-\frac{1}{m{{p}{i}}}$, these two choices will be nearly equal when $\small {1}/{m{{p}{i}}};$ is negligible compared to $\small {1}/{{{\left( m{{p}{i}} \right)}^{2}}};$. This will occur when all values of $m{{p}{i}}$ are small. The corrected estimator of $\small B^2$ is [\small {{\widehat{B}}^{2}}=\frac{m{{v}{psu}}}{\widehat{t}{pwr}^{2}} ] Changes in version 0.7 (2017-11-23) - wtdvar modified to handle NAs. - mibrfss file added. File was used in Valliant, R., and Dever, J. (2011), “Estimating Propensity Adjustments for Volunteer Web Surveys,” Sociological Methods and Research, 40, 105-137. Changes in version 0.6 (2017-07-26) - Recompiled program with R CMD check practools per B. Ripley email of 2017/07/17. This corrects some disallowed CRLF endings in some lines. Problem was old file called cleanup that was unnecessary. Changes in version 0.5 (2017-07-11) - BW2stagePPSe Fixed help file for BW2stagePPSe: wrong description of pp parameter Added k to output. See Section 9.2.3 in Practical Tools book. - BW2stagePPSe Added k1 and k2 to output. See Section 9.2.4 in Practical Tools book. Various functions - Fixed if statements to eliminate warning when logic test is applied to combination of conditions. - Design effect functions - All design effects can be requested in the deff function. deff calls one of these depending on the value of a type parameter: deffCR, deffH, deffK, or deffS - deffCR Added Chen-Rust design effect for stratified, two-stage sampling with varying weights. See Chen, S. and Rust, K. (2017). An Extension of Kish’s Formula for Design Effects to Two- and Three-Stage Designs with Stratification. \emph{Journal of Survey Statistics and Methodology}, 5(2), 111-130. Changes in version 0.4 (2016-10-23) - clusOpt2. Calculation of CV when cal.sw = 1 corrected to be $\small \frac{{\tilde{V}}}{m\bar{n}}k\left[ 1+\delta \left( \bar{n}-1 \right) \right]$. $\small k$ was omitted in previous versions. - clusOpt3. Calculation of CV when cal.sw=1 or 2 corrected to be [\small \frac{{\tilde{V}}}{m\bar{n},\bar{\bar{q}}}\left{ {{k}{1}}{{\delta }{1}}\bar{n},\bar{\bar{q}}+{{k}{2}}\left[ 1+{{\delta }{2}}\left( \bar{\bar{q}}-1 \right) \right] \right}]. ${{k}{1}}$ and ${{k}{2}}$ were omitted in previous versions. - nhis, nhis.large, nhispart. Help files updated to correct descriptions of stratum variable. Changes in version 0.3 (2015-11-16) - NRFUopt. Output for sample sizes in NRFUopt changed to unrounded numbers. Note added to help file saying that unrounded sample sizes are used to compute total expected cost. BW2stagePPS, BW3stagePPS - Description of pp in help file changed to “vector of one-draw probabilities for the PSUs; length is number of PSUs in population.” The examples for these functions ran correctly in previous versions and use values of pp that conform to the corrected description in the help file. Changes in version 0.2 (2015-06-01) - Classes for dub and strAlloc changed to power.htest. Changes in version 0.1 (2015-01-21) - deffk New function added to compute the Kish design effect for unequal weighting. - deffH New function added to compute the Henry design effect that accounts for any gains in efficiency when estimating the total of a y variable using a GREG estimator based on a vector of covariates. - deffS New function added to compute the Spencer design effect that accounts for any gain in efficiency of estimating a total when a y variable depends on selection probabilities. - nCont Error trap added: alpha cannot be a vector. - nContMoe New function added to compute sample sizes in srswor for continuous variables based on margins of error. - nhispart Population added to package. An extract from NHIS 2003 used in an exercise in chapter 14 of Practical Tools for Designing and Weighting Survey Samples. - nPropMoe Help description corrected. Function only computes sample sizes for proportions. Error trap added to check that $\small 0