getODummyMatForOneVec: Get O-dummy matrix for one-dimensional vector

Description Usage Arguments Value

View source: R/get-dummies.R

Description

Get O-dummy matrix for one-dimensional vector

Usage

1
2
getODummyMatForOneVec(x_vec, breaks = NULL, nbin.max = 100,
  only_info = FALSE, dummy_type = NULL)

Arguments

x_vec

An integer or numeric vector to be converted into dummy matrix.

breaks

A numeric vector which indicates the boundaries of bins, of length (number of bins + 1). If NULL, evenly cut bins are automatically generated and used.

nbin.max

A maximum number of bins which is used. Only used when breaks is not set.

only_info

A boolean value. If TRUE, actual creation of dummy matrix is omitted.

dummy_type

A character value. Choose 'C'(default) or 'J'. For integer or numeric x_vec, dummy_type='C' is used as default. Otherwise, dummy_type='J' is used as default.

  • 'C': Continuous-type dummies, which result continuous contribution curves.

  • 'J': Jum-type dummies, which result contribution curves with jumps.

Value

a list with two members breaks and dummy_mat.


kazuzowo/aglm-LVar documentation built on Dec. 10, 2019, 12:13 a.m.