Learn R Programming

rsq (version 0.6)

vsse: Variance-Function-Based Error Sum of Squares

Description

Calculate the error sum of squares which is defined on the basis of the variance function.

Usage

vsse(fitObj)

Arguments

fitObj
an object of class "lm" or "glm", usually, a result of a call to lm, glm, or glm.nb.

Value

Details

This is an internal function called by rsq.

References

Zhang, D. (2016). A coefficient of determination for generalized linear models. The American Statistician, tentatively accepted.

Examples

Run this code
data(hcrabs)
attach(hcrabs)
y <- ifelse(num.satellites>0,1,0)
bnfit <- glm(y~color+spine+width+weight,family=binomial)
vsse(bnfit)

Run the code above in your browser using DataLab