Skip to content

Commit

Permalink
Updated email
Browse files Browse the repository at this point in the history
  • Loading branch information
marberts committed Jan 2, 2024
1 parent 2a40e61 commit 4b15320
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 16 deletions.
17 changes: 14 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
Package: sps
Title: Sequential Poisson Sampling
Version: 0.5.3.9005
Version: 0.5.3.9006
Authors@R: c(
person("Steve", "Martin", role = c("aut", "cre", "cph"), email = "stevemartin041@gmail.com", comment = c(ORCID = "0000-0003-2544-9480")),
person("Steve", "Martin",
role = c("aut", "cre", "cph"),
email = "marberts@protonmail.com",
comment = c(ORCID = "0000-0003-2544-9480")),
person("Justin", "Francis", role = "ctb")
)
Description: Sequential Poisson sampling is a variation of Poisson sampling for drawing probability-proportional-to-size samples with a given number of units, and is commonly used for price-index surveys. This package gives functions to draw stratified sequential Poisson samples according to the method by Ohlsson (1998, ISSN:0282-423X), as well as other order sample designs by Rosén (1997, <doi:10.1016/S0378-3758(96)00186-3>), and generate appropriate bootstrap replicate weights according to the generalized bootstrap method by Beaumont and Patak (2012, <doi:10.1111/j.1751-5823.2011.00166.x>).
Description: Sequential Poisson sampling is a variation of Poisson sampling for
drawing probability-proportional-to-size samples with a given number of
units, and is commonly used for price-index surveys. This package gives
functions to draw stratified sequential Poisson samples according to the
method by Ohlsson (1998, ISSN:0282-423X), as well as other order sample
designs by Rosén (1997, <doi:10.1016/S0378-3758(96)00186-3>), and generate
appropriate bootstrap replicate weights according to the generalized
bootstrap method by Beaumont and Patak
(2012, <doi:10.1111/j.1751-5823.2011.00166.x>).
Depends: R (>= 4.0)
Imports: stats
Suggests:
Expand Down
3 changes: 2 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ knitr::opts_chunk$set(
[![R-CMD-check](https://github.com/marberts/sps/workflows/R-CMD-check/badge.svg)](https://github.com/marberts/sps/actions)
[![codecov](https://codecov.io/gh/marberts/sps/branch/master/graph/badge.svg?token=5CPGWUF267)](https://app.codecov.io/gh/marberts/sps)
[![DOI](https://zenodo.org/badge/326323827.svg)](https://zenodo.org/doi/10.5281/zenodo.10109857)
[![Mentioned in Awesome Official Statistics ](https://awesome.re/mentioned-badge.svg)](http://www.awesomeofficialstatistics.org)

Sequential Poisson sampling is a variation of Poisson sampling for drawing probability-proportional-to-size samples with a given number of units, and is commonly used for price-index surveys. This package gives functions to draw stratified sequential Poisson samples according to the method by Ohlsson (1998), as well as other order sample designs by Rosén (1997), and generate appropriate bootstrap replicate weights according to the generalized bootstrap method by Beaumont and Patak (2012).

Expand All @@ -39,7 +40,7 @@ install.packages("sps", repos = c("https://marberts.r-universe.dev", "https://cl
or directly from GitHub.

```{r, eval=FALSE}
pak::pkg_install("marberts/sps")
pak::pak("marberts/sps")
```

## Usage
Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ badge](https://marberts.r-universe.dev/badges/sps)](https://marberts.r-universe.
[![R-CMD-check](https://github.com/marberts/sps/workflows/R-CMD-check/badge.svg)](https://github.com/marberts/sps/actions)
[![codecov](https://codecov.io/gh/marberts/sps/branch/master/graph/badge.svg?token=5CPGWUF267)](https://app.codecov.io/gh/marberts/sps)
[![DOI](https://zenodo.org/badge/326323827.svg)](https://zenodo.org/doi/10.5281/zenodo.10109857)
[![Mentioned in Awesome Official
Statistics](https://awesome.re/mentioned-badge.svg)](http://www.awesomeofficialstatistics.org)

Sequential Poisson sampling is a variation of Poisson sampling for
drawing probability-proportional-to-size samples with a given number of
Expand All @@ -36,7 +38,7 @@ install.packages("sps", repos = c("https://marberts.r-universe.dev", "https://cl
or directly from GitHub.

``` r
pak::pkg_install("marberts/sps")
pak::pak("marberts/sps")
```

## Usage
Expand All @@ -54,11 +56,11 @@ revenue <- c(1:10, 100, 150)

# Draw a sample of 6 businesses
(samp <- sps(revenue, 6))
#> [1] 1 7 9 10 11 12
#> [1] 3 7 9 10 11 12

# Design weights and sampling strata are stored with the sample
weights(samp)
#> [1] 13.750000 1.964286 1.527778 1.375000 1.000000 1.000000
#> [1] 4.583333 1.964286 1.527778 1.375000 1.000000 1.000000
levels(samp)
#> [1] "TS" "TS" "TS" "TS" "TA" "TA"
```
Expand Down Expand Up @@ -91,13 +93,13 @@ replicate weights with the `sps_repweights()` function.

``` r
sps_repweights(weights(samp), 5, tau = 2)
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 2.250000 2.2500 1.500 2.750000 3.5000000
#> [2,] 0.875000 1.8125 0.875 1.812500 2.7500000
#> [3,] 2.333333 1.5000 2.000 1.166667 0.6666667
#> [4,] 1.000000 1.0000 1.000 1.000000 1.0000000
#> [5,] 1.000000 1.0000 1.000 1.000000 1.0000000
#> [6,] 1.000000 1.0000 1.000 1.000000 1.0000000
#> [,1] [,2] [,3] [,4] [,5]
#> [1,] 2.7500 1.500000 4.750000 2.2500 2.250000
#> [2,] 1.8125 2.750000 1.812500 2.3125 0.875000
#> [3,] 2.0000 1.166667 2.333333 2.0000 1.166667
#> [4,] 1.0000 1.000000 1.000000 1.0000 1.000000
#> [5,] 1.0000 1.000000 1.000000 1.0000 1.000000
#> [6,] 1.0000 1.000000 1.000000 1.0000 1.000000
#> attr(,"tau")
#> [1] 2
```
Expand Down
2 changes: 1 addition & 1 deletion inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ bibentry(
title = "{sps}: Sequential Poisson Sampling",
author = person("Steve", "Martin", role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-2544-9480")),
year = "2023",
year = "2024",
doi = "10.5281/zenodo.10109857",
url = "https://cran.r-project.org/package=sps",
note = sprintf("R package version %s", meta$Version)
Expand Down
2 changes: 1 addition & 1 deletion man/sps-package.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4b15320

Please sign in to comment.