model_matrix {ZIprop} | R Documentation |
Construct Design Matrix
Description
Creates a design matrix by expanding factors to a set of dummy variables.
Usage
model_matrix(DT, ColNameFactor, other_class)
Arguments
DT |
a data table contains the factors and the response. |
ColNameFactor |
a char vector with the name of the selected factor. |
other_class |
a char vector with the name of other classes than numeric (factor or char). |
Value
return the value.
Examples
library(data.table)
data(example_data)
m = model_matrix (example_data,
colnames(example_data)[-c(1:3)],
other_class = colnames(example_data)[14:23])
print(m)
[Package ZIprop version 0.1.1 Index]