logistErrorRate: Calculate the Error Rate and Results Table for Logistic...

View source: R/statLearn.R

logistErrorRateR Documentation

Calculate the Error Rate and Results Table for Logistic Regression Models

Description

Calculate the testing error rate for a dataset on a logistic regression model (or the training error rate if no dataset is entered), and a results table with responses versus predicted responses.

Usage

logistErrorRate(gmod, nw = NULL, p = 0.5)

Arguments

gmod

A logistic regression model

nw

A dataset for which a testing error rate should be calculated using the model in gmod. Note that it must contain the predictors as well as the responses. If this argument is NULL (the default) the training error rate will be calculated.

p

Probability (default .5) above which the observation is assigned to the second level of the response.

Value

List with training error rate if nw is NULL, testing error rate otherwise, and a results table with responses versus predicted responses.

Examples

gmod=glm(state~.,binomial,Puromycin)
logistErrorRate(gmod)

smallstuff documentation built on June 2, 2022, 5:06 p.m.