Learn R Programming

support.CEs (version 0.7-0)

gofm: Calculating goodness-of-fit measures

Description

This function provides rho-squared and rho-squared adjusted by the number of estimated coefficients.

Usage

gofm(output)

# S3 method for gofm print(x, digits = getOption("digits"), ...)

Value

This function returns an object of S3 class "gofm" that is a list with the following components.

RHO2

The rho-squared value. Defined as RHO2 = 1 - (LLb / LL0).

AdjRHO2

The rho-squared value adjusted by the number of estimated coefficients. Defined as AdjRHO2 = 1 - ((LLb - K) / LL0).

AIC

The Akaike Information Criterion (AIC).

BIC

The Bayesian Information Criterion.

K

The number of estimated coefficients.

LL0

The log likelihood value at the start.

LLb

The log likelihood value at convergence.

Arguments

output

An object containing the output from the function clogit or glm.

x

An object of class "gofm."

digits

A number of significant digits.

...

Arguments passed to the function format.

Author

Hideo Aizaki

Details

This function provides rho-squared (also called McFadden's R-squared or pseudo R-squared), rho-squared adjusted by the number of estimated coefficients, the number of estimated coefficients, and log likelihood values at the start and at convergence (see, e.g., Ben-Akiva and Lerman 1985; Cameron and Trivedi 2005).

In version 0.3-0 and later versions, this function is also available for calculating goodness-of-fit measures for binary choice models estimated by using the function glm in the package stats.

See Also

clogit, glm, make.dataset

Examples

Run this code
# See "Examples" for the function make.dataset.

Run the code above in your browser using DataLab