Description Usage Arguments Value Author(s) Examples
This function is to make dummy variables using a discrete variable.
1  | makeDummy(tZ)
 | 
tZ | 
 An input vector  | 
Returns dZ, a matrix of size length(tZ)-by-card(tZ) :
The ij-th element in dZ is 1 if tZ[i] is equal to the j-th largest value of tZ. And the ij-th element in DZ is 0 otherwise. The row sum of dZ must be 1 by construction.
Yujung Hwang, yujungghwang@gmail.com
1  | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.