cowboy_cut: Cut ordinal variables

Description Usage Arguments Value

View source: R/functions_tools.r

Description

If we are in a hurry and need to cut a lot of likert-scale or similar type of variables into MCA-friendly ordered factors this function comes in handy. cowboy_cut will try its best to create approx 3-5 categories, where the top and the bottom are smaller than the middle. Missing or other unwanted categories are recoded but still influence the categorization. So that when cowboy_cut tries to part the top of a variable with a threshold around 10 Make sure that levels are in the right order before cutting.

Usage

1
cowboy_cut(x, top.share = 0.1, bottom.share = 0.1, missing = "Missing")

Arguments

x

a factor

top.share

approximate share in top category

bottom.share

approximate share in bottom category

missing

a character vector with all the missing or unwanted categories.

Value

a recoded factor


soc.ca documentation built on Sept. 5, 2021, 5:21 p.m.

Related to cowboy_cut in soc.ca...