Learn R Programming

sdcMicro (version 2.6.3)

topBotCoding: Top and Bottom Coding

Description

Function for Top and Bottom Coding.

Usage

topBotCoding(x, value, replacement, kind = "top")

Arguments

x
vector or one-dimensional matrix or data.frame
value
limit, from where it should be top- or bottom-coded
replacement
replacement value.
kind
top or bottom

Value

  • Top or bottom coded data.

Details

Extreme values are replaced by one value to reduce the disclosure risk.

See Also

indivRisk

Examples

Run this code
data(free1)
topBotCoding(free1[,"DEBTS"], value=9000, replacement=9100, kind="top")

Run the code above in your browser using DataLab