measure_bh_raw: Obtain Measures of Model Fitness

View source: R/measure_raw.R

measure_bh_rawR Documentation

Obtain Measures of Model Fitness

Description

Obtain Measures of Model Fitness

Usage

measure_bh_raw(
  object,
  new.x,
  new.y,
  new.offset,
  classify = FALSE,
  classify.rule = 0.5
)

Arguments

object

A fitted object.

new.x

A data frame or matrix of new values for variables used in object. For an object from bglm, bpolr or bcoxph, it is data frame; for object from glmNet or bmlasso, it is matrix.

new.y

A vector of new response values corresponding to new.x. If new.x or new.y are omitted, the fitted linear predictors are used for prediction.

new.offset

A data frame or vector of offset values for new data points. If new.x includes offset, do not need to set new.offset.

classify

Logical. When TRUE and family = "binomial" applies a classification rule given by the argument classify.rule, and outputs accuracy, sensitivity, specificity, positive predictive value (ppv), and negative predictive value (npv).

classify.rule

A value between 0 and 1. For a given predicted value from a logistic regression, if the value is above classify.rule, then the predicted class is 1; otherwise the predicted class is 0. The default is 0.5.

Value

A vector.

Note

This function is taken directly from measure.bh in BhGLM, with the modification that measures are no longer rounded, and classification evaluation is possible for binary outcomes.


jmleach-bst/ssnet documentation built on March 4, 2024, 5:04 p.m.