GLM_Model | R Documentation |
Generalized Linear Model
GLM_Model(Data, xvar, yvar)
Data |
The name of the Dataset. |
xvar |
X variables. |
yvar |
Y variable. |
Let y be a vector of response variable of accessing credit for each applicant n, such that y_{i} = 1 if the applicant-i has access to credit, and zero otherwise. Furthermore, let let \bold{x} = x_{ij}, where i=1,...,n and j=1,...,p characteristics of the applicants. The log-odds can be define as:
log(\frac{π_{i}}{1-π_{i}}) = β_{0}+\bold{x}_{\bold{i}}β = β_{0}+∑_{i=1}^{p}β_{i}\bold{x}_{i}
β_{0} is the intercept, β = (β_{1},…, β_{p}) is a p x 1 vector of coefficients and x_{i} is the i_{th} row of x.
The output from GLM_Model
.
yvar <- c("multi.level") sample_data <- sample_data[c(1:750),] xvar <- c("sex", "married", "age", "havejob", "educ", "political.afl", "rural", "region", "fin.intermdiaries", "fin.knowldge", "income") BchMk.GLM <- GLM_Model(sample_data, c(xvar, "networth"), yvar ) BchMk.GLM$finalModel BchMk.GLM$Roc$auc
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.