1. Home
2. RCIRCULAR procedure

# RCIRCULAR procedure

Does circular regression of mean direction for an angular response (P.W. Goedhart).

### Options

`PRINT` = string tokens What to print (`model`, `summary`, `estimates`, `fittedvalues`, `monitoring`); default `mode`, `summ`, `esti` Limit for expansion of model terms; default 3 To save the residuals To save the fittedvalues, i.e. the fitted mean directions To save the leverages To save estimates of linear parameters To save standard errors of the estimates To save the variance-covariance matrix of the estimates To save the estimate of the mean parameter μ0 To save the standard error of the estimated mea parameter μ0 To save the estimate of the concentration parameter κ of the von Mises distribution To save the standard error of the estimated concentration parameter κ To save the value of minus twice the maximized log likelihood To save the residual degrees of freedom To save the iterative weights To save the linear predictor To save the adjusted dependent variate To save the contribution of each unit to the value of minus twice the maximized log likelihood Maximum number of iterations for see-saw algorithm; default 30 Convergence criterion; default 10-5

### Parameter

`TERMS` = formula List of explanatory variates and factors, or model formula

### Description

Procedure `RCIRCULAR` can be used to fit a circular regression model to an angular response. A circular regression model is similar in spirit to a generalized linear model; it employs the von Mises distribution and the arctangent link function. More formally, it is assumed that the angular response follows a von Mises distribution with mean direction μ and concentration parameter κ. The mean direction μ is related to the linear predictor η by means of the link function

μ = μ0 + 2 arctan(η)

which maps the real line to the circle. The linear predictor η itself is a linear function of all the regressors in the usual way, except that it does not include a constant term. The circular regression model is fitted by means of an iterative algorithm which employs re-weighted least squares to estimate the linear parameters. A detailed account can be found in Fisher (1993) or Fisher & Lee (1992).

Note that the model is not invariant to linear shifts of explanatory variates. This is because the linear predictor η does not contain a constant term. This can be a serious drawback of the circular regression model. An alternative model without the parameter μ0 and including an intercept in the linear predictor is not invariant to rotations of the response, which is even worse. Also note that the estimates on page 161 of Fisher (1993) are for the centred distance explanatory variable.

A call to `RCIRCULAR` must be preceded by a `MODEL` statement which defines the angular response variate. Only the first response variate is analysed and options other than `WEIGHTS` should not be set in the `MODEL` statement. The `TERMS` parameter of `RCIRCULAR` specifies the model to be fitted. Cases with a missing response variate or with a zero weight are excluded from the analysis. The `FACTORIAL` option operates in the usual way. Printed output is controlled by the `PRINT` option with the usual settings. Setting `PRINT=summary` displays the value of minus twice the maximized log likelihood, both for the fitted model and for the null model with only the constant μ0. The difference between the two log likelihood values is also printed with a corresponding probability based on the chi-square distribution using likelihood ratio testing. This tests whether the fitted model is an improvement over the null model. `PRINT=monitoring` displays monitoring information of the iterative algorithm. The iterative process itself is controlled by the `MAXCYCLE` option which determines the maximum number of cycles, and by the `TOLERANCE` option. The iterative process is stopped when the relative difference in minus twice the log likelihood is smaller than the specified tolerance.

Results of the circular regression can be saved by a number of options. The `ESTIMATES`, `SE` and `VCOVARIANCE` options save estimates of the linear parameters, their standard errors and variance-covariance matrix. This never includes the constant parameter. The estimate and standard error of the constant parameter μ0 can be saved using options `MU0` and `SEMU0`, and those for the concentration parameter κ of the von Mises distribution can be saved using options `KAPPA` and `SEKAPPA`. The `_2LOGLIKELIHOOD` option allows minus twice the maximized log likelihood to be saved, and the `DF` option saves the residual degrees of freedom. These may be useful for comparing a sequence of nested models fitted by `RCIRCULAR` using likelihood ratio testing. The `RESIDUALS`, `FITTEDVALUES`, `LEVERAGES`, `ITERATIVEWEIGHTS`, `LINEARPREDICTOR` and `YADJUSTED` options allow you to save the simple residuals, the fitted values (i.e. the fitted mean directions), the leverages of the iterative reweighted least squares algorithm, the linear predictor and an adjusted dependent variate. Finally the contribution of each unit to minus twice the maximized log likelihood can be saved by means of the `I_2LOGLIKELIHOOD` option.

Options: `PRINT`, `FACTORIAL`, `RESIDUALS`, `FITTEDVALUES`, `LEVERAGES`, `ESTIMATES`, `SE`, `VCOVARIANCE`, `MU0`, `SEMU0`, `KAPPA`, `SEKAPPA`, `_2LOGLIKELIHOOD`, `DF`, `ITERATIVEWEIGHTS`, `LINEARPREDICTOR`, `YADJUSTED`, `I_2LOGLIKELIHOOD`, `MAXCYCLE`, `TOLERANCE`.

Parameter: `TERMS`.

### Method

The model is fitted using the algorithm of Fisher & Lee (1993) and Fisher (1993). The iterative fitting of the model is adapted by adding the linear predictor from the previous cycle to the adjusted y variate. For a weighted circular regression the estimated circular standard error of μ0 is calculated using the sum of the weights instead of the degrees of freedom, see equation (6.64) in Fisher (1993). Note that the estimated standard errors for the linear parameters are conditional on the estimates of μ0 and κ, and vice versa.

### Action with `RESTRICT`

Only the angular response variate can be restricted. The analysis is restricted accordingly.

Fisher, N.I. & Lee, A.J. (1992). Regression models for an angular response. Biometrics, 48, 665-677.

Fisher, N.I. (1993). Statistical Analysis of Circular Data. Cambridge University Press, Cambridge.

Procedures: `CASSOCIATION`, `CCOMPARE`, `CDESCRIBE`, `DCIRCULAR`, `WINDROSE`.

Commands for: Regression analysis.

### Example

```CAPTION 'RCIRCULAR example',\
!t('Directions moved by 31 periwinkles as a function of distance',\
'(Fisher 1993, Statistical Analysis of Circular Data p.160-162).');\
STYLE=meta,plain
VARIATE [NVALUES=31] distance,direction