MLM_Model | R Documentation |
Multinominal Logistic Model
MLM_Model(Data, xvar, yvar)
Data |
The name of the Dataset. |
xvar |
X variables. |
yvar |
Y variable. |
Multi-nominal model is the generalized form of generalized logistic model and can be define as
π_{i}^{h} = P(y_{i}^{h} = 1 | \bold{x}_{\bold{i}}^{h})
where h presents the class labels ("1-of-h") on the basis of an input vector x_j, in our case x_j is loan types ("Formal Loan", "Informal Loan", "Both Loan", and "No Loan"). Furthermore,
y_{i}^h = 1if the weight w of x_j corresponds to belong a class and y_{i}^h=0 otherwise. For i \in 1,...,h and the weight vectors w^i corresponds to class i.
We set {\bold{{w}}^{h}} = 0 and the parameters to be learned are the weight vectors w^i for i \in 1,...,h-1 . And the class probabilities must satisfy
∑_{i=1}^{h} P(y_{i}^{h} = 1 | \bold{x}_{\bold{i}}^{h}, \bold{w}) = 1.
The output from MLM_Model
.
yvar <- c("Loan.Type") sample_data <- sample_data[c(1:750),] xvar <- c("sex", "married", "age", "havejob", "educ", "political.afl", "rural", "region", "fin.intermdiaries", "fin.knowldge", "income") BchMk.MLM <- MLM_Model(sample_data, c(xvar, "networth"), yvar ) BchMk.MLM$finalModel BchMk.MLM$Roc$auc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.