round3: Randomly round a dataset to base 3.

Description Usage Arguments Details Value Examples

Description

Confidentialise counts data by randomly rounding it to multiples of three.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
round3(object)

## S4 method for signature 'Counts'
round3(object)

## S4 method for signature 'Values'
round3(object)

## S4 method for signature 'array'
round3(object)

## S4 method for signature 'numeric'
round3(object)

Arguments

object

An object of class DemographicArray, an ordinary array, or a numeric vector.

Details

Randomly rounding to base three is a popular confidentialisation technique at statistical agencies. It only works with data consisting entirely of integers, though negative integers are allows.

A value is rounded as follows:

Missing values are permitted, and are left unchanged.

Value

An object with the same class as object.

Examples

1
2
3
x <- CountsOne(0:10, labels = letters[1:11], name = "region")
round3(x)
round3(x)

StatisticsNZ/dembase documentation built on Dec. 25, 2021, 4:49 p.m.