Learn R Programming

circglmbayes (version 1.3.0)

residuals.circGLM: Obtain residuals from a circGLM object

Description

Computes the residuals either by taking the arc distance or the cosine distance between the predictions and the observed outcomes.

Usage

# S3 method for circGLM
residuals(object, type = "arc", ...)

Arguments

object

A circGLM object.

type

Either "arc" or "cosine", the type of distance to take.

...

Further arguments passed to or from other methods.

Value

A numeric vector of residuals. If type is "arc", these are angles in radians. If type is "cosine", these are numeric values between 0 and 2.

Examples

Run this code
# NOT RUN {
m <- circGLM(th = rvmc(10, 0, 1))
residuals(m)

# Cosine residuals
residuals(m, type = "cosine")

# }

Run the code above in your browser using DataLab