MLM_Model {pomodoro}R Documentation

Multinominal Logistic Model

Description

Multinominal Logistic Model

Usage

MLM_Model(Data, xvar, yvar)

Arguments

Data

The name of the Dataset.

xvar

X variables.

yvar

Y variable.

Details

Multi-nominal model is the generalized form of generalized logistic model and can be define as

πih=P(yih=1xih)\pi_{i}^{h} = P(y_{i}^{h} = 1 | \bold{x}_{\bold{i}}^{h})

where hh presents the class labels ("1-of-h") on the basis of an input vector xjx_j, in our case xjx_j is loan types ("Formal Loan", "Informal Loan", "Both Loan", and "No Loan"). Furthermore,

yih=1y_{i}^h = 1if the weight w of xjx_j corresponds to belong a class and yih=0y_{i}^h=0 otherwise. For ii \in 1,,h1,\ldots,h and the weight vectors w^i corresponds to class ii.

We set wh=0{\bold{{w}}^{h}} = 0 and the parameters to be learned are the weight vectors w^i for ii \in 1,,h11,\ldots,h-1 . And the class probabilities must satisfy

i=1hP(yih=1xih,w)=1.\sum_{i=1}^{h} P(y_{i}^{h} = 1 | \bold{x}_{\bold{i}}^{h}, \bold{w}) = 1.

Value

The output from MLM_Model.

Examples

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

[Package pomodoro version 3.8.0 Index]