Learn R Programming

MaskJointDensity (version 1.0)

Masking, Unmasking and Restoring Confidential Data

Description

Three key functionalities are present. It is able to mask confidential data using multiplicative noise. It is able to unmask this data while still preserving confidentiality. It is able to calculate the numerical joint density function of the original data from the unmasked data, as well as obtaining a sample from the marginal density functions of the unmasked data. The final results are a reasonable approximation to the original data for the purposes of analysis (Lin et al. (2018) ).

Copy Link

Version

Install

install.packages('MaskJointDensity')

Monthly Downloads

12

Version

1.0

License

GPL-2

Maintainer

Luke Mazur

Last Published

May 22nd, 2018

Functions in MaskJointDensity (1.0)

MaskJointDensity-package

Masking, unmasking and restoring confidential data.
calc_muX

Calculate the moments
moments

moment
lambda_Rmask

expectation of Legendre polynomial
positions

Function for finding the positions of the node representing the points at which to sample from the kernel density estimate.
mask

Core function the Data Provider uses to mask the confidential original data to give to the user
maskBatch

A batch function that the Data Provider can use to mask the confidential original data to give to the user, all in one batch
rmulti

Simple way to generate noise
gRho

Purely used in rho_0
rho_0

Purely used in generalizedJointF
sampleDensity

A function used to simulate a sample from a kernel function, where the kernel function is determined by a given sample.
unmask

First core function used by End-User
unmaskAndGetSampleBatch

Batch function that allows the user to unmask a number of variables as well as to sample from the estimated joint density function. Serves as a wrapper for the first and second functions the End-User calls to obtain the samples from the marginal distributions of the unmasked data.
G_Point7

The seven points used for Gaussian Hermite Quadrature
anyNA

Checks for NA in a vector
CheckRho

An old artefact from testing, purely for backwards compatibility
EQsampleDensity

Samples from a bunch of nodes on a grid.
P_Rmask

Legendre polynomial
density_Rmask

Density function
generalizedJointF

Purely used in getSampleFromMarginalDistributionOfUnmaskedData
GH_Quadrature

The seven weights used for Gaussian Hermite Quadrature
getSampleBasedOnUnmaskedData

Second core function the End-User uses to obtain the samples from the marginal distributions of the unmasked data
createNoise

Create a noise
barredToActual

Purely used in actualPosition
actualPosition

Getting a Sample from Marginal Density Functions
Dg

Purely used in rho_0
encriptNoise

encript noise
FPI2002Data

A real life dataset consisting of the bilateral investment between many different countries in 2002, as well as the corresponding covariates from 2001. This was to eliminate any dual causality element in data analysis.
findOrder_Rmask

order determination
getSampleFromMarginalDistributionOfUnmaskedData

Second function the End-User uses to obtain the samples from the marginal distributions of the unmasked data
fY_Rmask

density of Y
qkdeSorted

A slightly altered version of qkde from package ks