MyNixOS website logo
Description

Generation of Perturbation Tables for the Cell-Key Method.

Tabular data from statistical institutes and agencies are mostly confidential and must be protected prior to publications. The cell-key method is a post-tabular Statistical Disclosure Control perturbation technique that adds random noise to tabular data. The statistical properties of the perturbations are defined by some noise probability distributions - also referred to as perturbation tables. This tool can be used to create the perturbation tables based on a maximum entropy approach as described for example in Giessing (2016) <doi:10.1007/978-3-319-45381-1_18>. The perturbation tables created can finally be used to apply a cell-key method to frequency count or magnitude tables.

R-package ptable

R-CMD-check Codecov testcoverage GitHub lastcommit GitHub code size inbytes CRANstatus

Overview

The goal of the ptable package is to produce perturbation tables that can be used for applying noise to statistical tables with the cell-key method (CKM).

Information

This package is developed within the SGA Open source tools for perturbative confidentiality methods. The package contains the core-features to produce and check perturbation tables (i.e. ptables) for frequency count and magnitude tables. The ptables can be used for applying noise to statistical tables with any cell-key method approach - among others either the cellKey()-package or TauArgus.

Feedback (via issues) with regards to bugs or features requests are very welcome as well as pull-requests.

Important Note

  • With Release 1.0.0 we offer a first stable version which also will be available on CRAN.

  • With Release 0.4.0 we offer an additional modification of ptables for frequency count data in order to receive an higher level of protection

Installation

Stable version from CRAN

A stable version of the package can directly be installed from CRAN

install.packages("ptable")

Versions under development from github

Directly (online)

Newer versions of the package can be directly installed from github using the devtools package which must be installed on your system

if (!require("devtools")) install.packages("devtools")
library(devtools)

# update all packages
update.packages(ask = FALSE)

# finally install the ptable package directly from github
devtools::install_github(
  "sdcTools/ptable",
  dependencies = c("Depends", "Imports"),
  force = TRUE,
  build_opts = "--build-vignettes"
)

If you experience a timeout due to a proxy server while downloading, one can work around this issue by specifying the proxy-server using the hhtr package:

httr::set_config(use_proxy(url = "xxx.xxx.xxx.xxx", port = yy))
Source file (offline)

Alternatively you can download an archive (tar.gz) of the newest release here and install it manually using

install.packages('C:/Users/.../Downloads/v1.x.x.tar.gz', repos = NULL, type = 'source')

Usage

Load the package

To load the package ptable you have to call

library(ptable)

Help & Documentation

## help file
?ptable::ptable_pkg

A detailed documentation is given in the vignette:

pt_vignette()

Graphical User Interface (GUI)

For first time users and visual learners there is a GUI. The unfinished dashboard can be started using the following command:

ptable()

The download buttons (for downloading the ptable and the graphics) only works within a browser.

Updates

The changelog is given here.

Major Change

Starting from versions > 0.3.2 and > 0.4.1, functions create_ptable(), create_cnt_ptable() and create_num_ptable() allow to create perturbation objects for count- and/or numeric variables in one step. The required inputs to these functions are the maximum noise D=... and the noise variance V=....

In versions <= 0.3.2, this process was separated into two parts:

  1. defining parameters using pt_create_pParams()
  2. creating the final perturbation outputs using pt_create_pTable()

These steps still work in newer versions of the package differently (if necessary):

  1. If the argument create in create_ptable(), create_cnt_ptable() or create_num_ptable() is set to FALSE, then these functions return an object of class [ptable_params-class].
  2. This object can be used as input in create_ptable() only to create the final perturbation output.

To-Dos

  • Allow for special cases: extended parameter setting, i.e. improved row-wise parameter settings
  • Add more sophisticated error codes
  • Update test environment
  • Improve accuracy of ptable by means of digits-functionality.
Metadata

Version

1.0.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows