rsq {micsr}R Documentation

Coefficient of determination

Description

A generic function to compute different flavors of coefficients of determination

Usage

rsq(x, type)

## S3 method for class 'lm'
rsq(x, type = c("raw", "adj"))

## S3 method for class 'micsr'
rsq(
  x,
  type = c("mcfadden", "cox_snell", "cragg_uhler", "aldrich_nelson", "veall_zimm",
    "estrella", "cor", "ess", "rss", "tjur", "mckel_zavo", "w", "lm", "lr")
)

Arguments

x

fitted model

type

the type of coefficient of determination

Value

a numeric scalar.

Examples

pbt <- binomreg(mode ~ cost + ivtime + ovtime, data = mode_choice, link = 'probit')
rsq(pbt)
rsq(pbt, "estrella")
rsq(pbt, "veall_zimm")

[Package micsr version 0.1-1 Index]