GLM_Model {pomodoro}R Documentation

Generalized Linear Model

Description

Generalized Linear Model

Usage

GLM_Model(Data, xvar, yvar)

Arguments

Data

The name of the Dataset.

xvar

X variables.

yvar

Y variable.

Details

Let y be a vector of response variable of accessing credit for each applicant nn, such that yi=1y_{i}=1 if the applicant-ii has access to credit, and zero otherwise. Furthermore, let let x=xij\bold{x} = x_{ij}, where i=1,,ni=1,\ldots,n and j=1,,pj=1,\ldots,p characteristics of the applicants. The log-odds can be define as:

log(πi1πi)=β0+xiβ=β0+i=1pβixilog(\frac{\pi_{i}}{1-\pi_{i}}) = \beta_{0}+\bold{x}_{\bold{i}}\beta = \beta_{0}+\sum_{i=1}^{p}\beta_{i}\bold{x}_{i}

β0\beta_{0} is the intercept, β=(β1,,βp)\beta = (\beta_{1},\ldots, \beta_{p}) is a pp xx 11 vector of coefficients and xi\bold{x_{i}} is the ithi_{th} row of x.

Value

The output from GLM_Model.

Examples

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

[Package pomodoro version 3.8.0 Index]