CircularRegression

CircularRegression is an R package for fitting regression models when the response is circular, such as a movement direction or an angle measured in radians. It implements homogeneous angular regression, consensus angular regression, a two-step workflow, selected model-specific interfaces, and a random-intercept extension for clustered circular responses.

CRAN version: 0.5.1, published on June 10, 2026.

Visual preview

The illustration below is produced from the bison data included in the package. The left panel compares observed directions with model-fitted directions, and the right panel summarizes angular residuals.

Illustration of a CircularRegression fit on bison movement directions.

Usage example

The code below fits a circular regression model to the bison data included in the package. Formula syntax can use directional variables directly, or directions weighted by a non-negative modifier with the x:z form.

# Load library
library(CircularRegression)

# Prepare example data
data(bison)
d <- bison[seq_len(100), ]

# Fit a circular regression model
fit <- circular_regression(
  y.dir ~ y.prec + x.meadow:z.meadow,
  data = d
)

# Inspect the fitted model
summary(fit)
coef(fit)
head(predict(fit))

What is CircularRegression for?

  • modeling angular or directional responses;
  • fitting homogeneous angular regression or consensus angular regression models;
  • using a two-step workflow that connects consensus and homogeneous models;
  • analyzing clustered circular responses with a random-intercept extension;
  • producing diagnostics, predictions, residuals, information criteria, and summaries adapted to circular models.