Learn R Programming

cat2cat (version 0.4.7)

Handling an Inconsistently Coded Categorical Variable in a Longitudinal Dataset

Description

Unifying an inconsistently coded categorical variable between two different time points in accordance with a mapping table. The main rule is to replicate the observation if it could be assigned to a few categories. Then using frequencies or statistical methods to approximate the probabilities of being assigned to each of them. This procedure was invented and implemented in the paper by Nasinski, Majchrowska, and Broniatowska (2020) .

Copy Link

Version

Install

install.packages('cat2cat')

Monthly Downloads

301

Version

0.4.7

License

GPL (>= 2) | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Maciej Nasinski

Last Published

January 22nd, 2024

Functions in cat2cat (0.4.7)

summary_c2c

Adjusted summary for linear regression when based on replicated dataset
trans

trans dataset containing mappings (transitions) between old (2008) and new (2010) occupational codes. This table could be used to map encodings in both directions.
validate_cover_cats

Validate if the trans table contains all proper mappings
verticals2

verticals2 dataset
verticals

verticals dataset
plot_c2c

Summary plots for cat2cat results
occup_small

Occupational dataset - small one
dummy_c2c

Add default cat2cat columns to a `data.frame`
cat_apply_freq

Applying frequencies to the object returned by the `get_mappings` function
cross_c2c

Make a combination of weights from different methods
cat2cat

Automatic mapping in a panel dataset
cat2cat_ml

The internal function used in the cat2cat one
get_mappings

Transforming a mapping (transition) table to two associative lists
cat2cat_ml_run

Function to check cat2cat ml models performance
cat2cat_agg

Manual mapping for an aggregated panel dataset
prune_c2c

Pruning which could be useful after the mapping process
get_freqs

Getting frequencies from a vector with an optional multiplier
occup

Occupational dataset
resolve_frequencies

Resolve the frequencies