Learn R Programming

micsr (version 0.1-1)

rsq: Coefficient of determination

Description

A generic function to compute different flavors of coefficients of determination

Usage

rsq(x, type)

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

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

Value

a numeric scalar.

Arguments

x

fitted model

type

the type of coefficient of determination

Examples

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

Run the code above in your browser using DataLab