version 1.5 2023-01-13 - Some minor grammatical errors in the user's manual where fixed. - A minor correction to the 'Pkl.Hajek.s()' and 'Pkl.Hajek.U()' functions was made to improve speed for the particular (and very rare case) of having all ones in the input vector of the first-order inclusion probabilities. - A simple performance optimization is made in all routines, replacing 'rep(1, times = n)' by 'rep.int(1, n)' as the latter is a little bit faster. Below an example using the microbenchmark package: > # Loading packages for comparison > require(microbenchmark) > require(ggplot2) > n <- 10000 > identical(rep(1,times=n), rep.int(1,n)) [1] TRUE > # Testing > compare <- microbenchmark(rep(1,times= n), rep.int(1,n), times=10000) > # Printing the comparison results > print(compare) Unit: microseconds expr min lq mean median uq max neval rep(1, times = n) 10.700 11.000 15.43633 11.101 11.300 4788.100 10000 rep.int(1, n) 7.201 8.001 11.41625 8.202 8.501 3781.301 10000 > # Plot of the comparison results > autoplot(compare) - Another simple performance optimization is made in all routines, replacing '(n-1)/n' by '1-1/n' as the latter takes almost half of the computing time. This also applies for '(Doublen-1)/Doublen' replaced by 'Doublen-1/Doublen'. Below an example using the microbenchmark package: > require(microbenchmark) > require(ggplot2) > n <- 10000 > print((n-1)/n) [1] 0.9999 > print(1-1/n) [1] 0.9999 > identical((n-1)/n, 1-1/n) [1] TRUE > # Testing > compare <- microbenchmark((n-1)/n, 1-1/n, times=10000) > # Printing the comparison results > print(compare) Unit: nanoseconds expr min lq mean median uq max neval (n - 1)/n 200 200 244.31 200 300 3900 10000 1 - 1/n 100 100 126.55 100 100 1400 10000 > # Plot of the comparison results > autoplot(compare) - A simple performance optimization is made in some routines (VE.Hajek.Mean.NHT, VE.HT.Mean.NHT, VE.SYG.Mean.NHT), replacing '1/(n * n)' by '1/n/n' as the latter is a little bit faster. Below an example using the microbenchmark package: > # Loading packages for comparison > require(microbenchmark) > require(ggplot2) > n <- 123 > print(1/(n*n)) [1] 6.609822e-05 > print(1/n/n) [1] 6.609822e-05 > identical(1/(n*n), 1/n/n) [1] FALSE > # Testing > compare <- microbenchmark(1/(n*n), 1/n/n, times=10000) > # Printing the comparison results > print(compare) Unit: nanoseconds expr min lq mean median uq max neval 1/(n * n) 200 200 260.57 200 300 41400 10000 1/n/n 100 100 190.43 200 200 19600 10000 > # Plot of the comparison results > autoplot(compare) version 1.4 2019-07-25 - Updated maintainer's email address. version 1.3 2018-09-28 - Some surely useless 'as.double()' or 'as.integer()' were removed in all routines for faster results, a deeper check. - Some interval checks in arguments, e.g. 'any(VecPk.s<=0|VecPk.s>1)' were replaced by 'min(VecPk.s)<=0|max(VecPk.s)>1' as the latter is almost 4 times faster. Below an example using the microbenchmark package: > # Loading packages for comparison > require(microbenchmark) > require(ggplot2) > x <- runif(n = 100000) > y <- c(x,2) > ans1 <- any(x<=0|x>1) > ans2 <- min(x)<= 0|max(x)>1 > ans3 <- any(y<=0|y>1) > ans4 <- min(y)<= 0|max(y)>1 > identical(ans1, ans2) [1] TRUE > identical(ans3, ans4) [1] TRUE > # Testing > compare <- microbenchmark(any(x<=0|x>1), min(x)<= 0|max(x)>1, any(y<=0|y>1), min(y)<= 0|max(y)>1, times=10000) > # Printing the comparison results > print(compare) Unit: microseconds expr min lq mean median uq max neval any(x <= 0 | x > 1) 708.761 722.513 898.3372 748.960 886.480 51354.474 10000 min(x) <= 0 | max(x) > 1 245.422 246.480 271.2233 251.064 299.373 5031.497 10000 any(y <= 0 | y > 1) 708.761 722.513 895.6946 745.434 886.127 50101.978 10000 min(y) <= 0 | max(y) > 1 245.422 246.832 270.3718 251.770 299.373 1034.933 10000 > # Plot of the comparison results > autoplot(compare) - Other arguments' checks that were using 'any()' were changed in a similar way for faster results. version 1.2 2018-09-21 - A simple performance optimization is made in all routines, replacing 'any(is.na(x))' by 'anyNA(x)' for speed. Note that this needs R >= 3.1.0. See: https://stackoverflow.com/questions/6551825/fastest-way-to-detect-if-vector-has-at-least-1-na - Some surely useless 'as.double()' or 'as.integer()' were removed in all routines. version 1.1 2017-07-10 - There was a problem with the C code for the 'Pk.PropNorm.U()' function (in some cases the sum of the output vector did not match the sample size). It is now fixed. - The CRAN check package submission NOTE: "Found no calls to: 'R_registerRoutines', 'R_useDynamicSymbols'" is now fixed. - Some polishing of the user's manual. version 1.0-2 2016-06-12 - Negative values of the MOS variable 'VecMOS.U' are converted to zero before computing inclusion probabilities using the function 'Pk.PropNorm.U()'. - Some polishing of the user's manual. version 1.0-1 2016-01-02 - Two point estimators for the empirical cumulative distribution function were added. - Some polishing of the user's manual. version 0.9-9 2014-05-13 - Updated maintainer's email address. version 0.9-8 2013-12-31 - Some linearisation variance estimators for the ratio point estimator are added. - Restrictions on the input of n and N (sample and population sizes) are relaxed. It is no longer needed that they are (formally) integers. They now can be double-precision scalars with zero-valued fractional parts. - When using the Tukey's Jackknife it is now optional to utilise a finite population correction (FPC). A logical argument that indicates whether to use it or not was added to those functions that implement Tukey's jackknife variance estimators. - Some polishing of the user's manual. version 0.9-7 2013-12-14 - A point estimator for the intercept regression coefficient is added. - Some variance estimators for the intercept regression coefficient point estimator are added. - Some polishing of the user's manual. version 0.9-6 2013-09-03 - Updated references and some polishing of the user's manual. - First ChangeLog entry.