knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
library(qacReg)

The qacReg package provide functions that offer a simple workflow for fitting and evaluating multiple linear or logistic regression models.

Actual model fitting is usually an iterative approach. However, the functions in the table below will help you to approach the process in a more structured fashion.

library(knitr)
library(dplyr)
library(kableExtra)
d <- data.frame(
  Function=c( "**regress**(*formula*, *data*)", 
              "**info**(*model*)", 
              "**diagnostics**(*model*)",  
              "**me_plots**(*model*)", 
              "**relimp**(*model*)", 
              "**performance**(*model*)"),
  Description=c("Fits a multiple linear or a logistic regression
                model, depending on the number of unique values in the response variable.",

                "For a linear model, prints an overall summary,
                fit indices (R2, adj-R2, RMSE, MSE), omnibus F test,
                ANOVA table (type III SS), and a regression
                coefficients table that includes raw and
                standardized coefficients, SEs, t-tests, and
                p-values. \n\nFor a logistic regression 
                model, this prints an overall summary, omnibus
                chi-square test, fit measures (Stukel's GOF test,
                Tjur's Pseudo R2), ANOVA table (type III SS),
                regression coefficients (raw coefficients, SEs,
                z-values, p-values), and odds rations with 95%
                confidence intervals.",
                "For a linear model, creates plots to evaluate
                the normality of the residuals, linearity between
                predictors and response variable, homogeneity of 
                variance, multicolinearity, outliers, and
                influential observations.\n\nFor a logistic
                regression model, it creates plots to evaluate linearity 
                between predictors and log-odds of the binary outcome,
                as well as multicolinearity, outliers, and 
                influential observations.", 
                "Generates one or more marginal effects graphs displaying the 
                relationship between each predictor and the outcome,
                controlling for the other predictors in the model", 
                "Applies Dominance Analysis (DA) to rank order the variables in a linear or logistic regression in terms of relative importance.", 
                "Provides indices of predictive performance for linear and logistic regression models. The statistics can be calculated for the training
                or test data set. \n\nFor linear regression, RMSE, MEA, and Rsquare are provided. For logistic regression output includes
                a confustion matrix and category based statistics (such as sensitivity, specificity, etc.). A visualization of the results is also 
                provided."))



kbl(d) %>% kable_styling(bootstrap_options = "striped", full_width = F, position = "left")

Additional functions

d <- data.frame(
  Function=c( "**forest_plot**(*model*)", 
              "**roc_plot**(*actual*, *prob*)", 
              "**lift_plot**(*actual*, *prob*)"),
  Description=c('Display a forest plot of regression parameters for a linear model  or odds rations for a logistic regression model.',
                "Plot a receiver operating characteristic curve for a binary predictive model.",
                "Creates lift and gain charts for binary classification problems."))

kbl(d) %>% kable_styling(bootstrap_options = "striped", full_width = F, position = "left")

See the Vignettes and Reference sections for examples.



Rkabacoff/qacReg documentation built on Aug. 1, 2022, 11:11 p.m.