suppressMessages(library(PDtoolkit))
data(loans)
trf <- c("Creditability", "Account Balance", "Duration of Credit (month)",
"Age (years)", "Guarantors", "Concurrent Credits")
res <- stepFWDr(start.model = Creditability ~ 1,
p.value = 0.05,
db = loans[, trf],
check.start.model = TRUE,
offset.vals = NULL)
summary(res$model)$coefficients
rf.check <- tapply(res$dev.db$Creditability,
res$dev.db$Guarantors,
mean)
rf.check
diff(rf.check)
res$steps
head(res$dev.db)
Run the code above in your browser using DataLab