circridge.cv: Cross-validation for the ridge circular regression

View source: R/circridge.cv.R

circridge.cvR Documentation

Cross-validation for the ridge circular regression

Description

Cross-validation for the ridge circular regression.

Usage

circridge.cv(y, x, rads = TRUE, type = "vm", lambda = NULL, nlambda = 100, tol = 1e-06,
maxiters = 100, folds = NULL, nfolds = 10, seed = NULL)

Arguments

y

A vector with the circular data expressed in radians, or angles.

x

The independent variable(s). Can be Euclidean or categorical (factor variables).

rads

If the data are expressed in angles set this to FALSE.

type

The distribution to fit, "vm" is von Mises distribution, "pn" is projected normal distribution, "cipc" is CIPC (or wrapped Cauchy) distribution.

lambda

A vector with a sequence of the ridge \lambda values. If you do not know it leave it NULL and the function will compute it internally.

nlambda

The number of \lambda values to compute.

tol

The tolerance value to terminate the Fisher scoring algorithm.

maxiters

The maximum number of iterations the Fisher scoring algorithm will perform.

folds

If you have the list with the folds supply it here. You can also leave it NULL and it will create folds.

nfolds

The number of folds to produce.

seed

You can specify your own seed number here or leave it NULL.

Details

K-fold cross-validation for the ridge circular regression models.

Value

A list including:

runtime

The runtime of the ridge regression model.

info

A matrix with two columns containing the lambda and the fit, the \sum_i y_i^T\hat{y}_i/n_k.

lambda_opt

The optimal value of the ridge parameter, \lambda.

be

The coefficients of the ridge circular regression model corresponding to the optimal \lambda value.

Author(s)

Michail Tsagris.

R implementation and documentation: Michail Tsagris mtsagris@uoc.gr.

References

Tsagris M., Papastamoulis P. and Kato S. (2025). Directional data analysis using the spherical Cauchy and the Poisson kernel-based distribution. Statistics and Computing, 35:51.

Presnell B., Morrison S. P. and Littell Ramon C. (1998). Projected multivariate linear models for directional data. Journal of the American Statistical Association, 93(443): 1068–1077.

See Also

circ.ridge

Examples

y <- rcirc(100, mu = 3, kappa = 2, rads = TRUE, type = "vm")
x <- matrix( rnorm(100 * 10), ncol = 10)
circ.ridge(y, x, type = "vm")

circda documentation built on Sept. 15, 2026, 5:09 p.m.