Skip to contents

Gapped-uniform sampling specification

Usage

synthetic.sampling.gapped.uniform(
  intervals,
  allocation = c("multinomial", "fixed.proportion", "fixed.count"),
  probabilities = NULL,
  counts = NULL,
  rounding = c("largest.remainder", "floor.first.remainder.last"),
  order = c("draw", "ascending"),
  algorithm = "sequential.interval.runif.v1"
)

Arguments

intervals

Two-column matrix of disjoint intervals.

allocation

Allocation policy.

probabilities

Optional allocation probabilities.

counts

Optional fixed counts.

rounding

Fixed-proportion rounding rule.

order

Ordering policy.

algorithm

Versioned draw algorithm.

Value

A synthetic sampling component.

Examples

intervals <- rbind(c(-1, -0.25), c(0.25, 1))
synthetic.sampling.gapped.uniform(intervals, probabilities = c(0.5, 0.5))
#> $kind
#> [1] "sampling"
#> 
#> $family
#> [1] "gapped.uniform"
#> 
#> $version
#> [1] 1
#> 
#> $parameters
#> $parameters$intervals
#>       [,1]  [,2]
#> [1,] -1.00 -0.25
#> [2,]  0.25  1.00
#> 
#> $parameters$allocation
#> [1] "multinomial"
#> 
#> $parameters$probabilities
#> [1] 0.5 0.5
#> 
#> $parameters$counts
#> NULL
#> 
#> $parameters$rounding
#> [1] "largest.remainder"
#> 
#> $parameters$order
#> [1] "draw"
#> 
#> $parameters$algorithm
#> [1] "sequential.interval.runif.v1"
#> 
#> 
#> attr(,"class")
#> [1] "synthetic_gapped_uniform_sampling" "synthetic_sampling_component"     
#> [3] "synthetic_sampling"                "synthetic_component"