Learn R Programming

spaMM (version 4.6.1)

gof: Goodness of fit test

Description

Performs a test of goodness of fit. The only method implemented so far is based on randomized quantile residuals (Dunn & Smyth, 1996).

Usage

gof(object, method = "RQR", ...)

Value

Returns the value of a call to shapiro.test (“a list with class "htest"”) with added element RQR, itself a list including the randomized residuals.

Arguments

object

A fit object inheriting from class "HLfit", as returned by spaMM's main fitting functions.

method

Character string; a method of test of goodness of fit.

...

Further arguments possibly passed to internal methods.

References

Dunn, K. P., and Smyth, G. K. (1996). Randomized quantile residuals. Journal of Computational and Graphical Statistics 5, 1-10.

Examples

Run this code
data("Orthodont", package = "nlme")
sp1 <- fitme(distance ~ age * Sex + (1 | Subject), data = Orthodont)
gof(sp1) #  classic toy example, but poor fit.                

Run the code above in your browser using DataLab