1. Home
  2. RCIRCULAR procedure

RCIRCULAR procedure

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


PRINT = string tokens What to print (model, summary, estimates, fittedvalues, monitoring); default mode, summ, esti
FACTORIAL = scalar Limit for expansion of model terms; default 3
RESIDUALS = variate To save the residuals
FITTEDVALUES = variate To save the fittedvalues, i.e. the fitted mean directions
LEVERAGES = variate To save the leverages
ESTIMATES = variate To save estimates of linear parameters
SE = variate To save standard errors of the estimates
VCOVARIANCE = symmetric matrix To save the variance-covariance matrix of the estimates
MU0 = scalar To save the estimate of the mean parameter μ0
SEMU0 = scalar To save the standard error of the estimated mea parameter μ0
KAPPA = scalar To save the estimate of the concentration parameter κ of the von Mises distribution
SEKAPPA = scalar To save the standard error of the estimated concentration parameter κ
_2LOGLIKELIHOOD = scalar To save the value of minus twice the maximized log likelihood
DF = scalar To save the residual degrees of freedom
ITERATIVEWEIGHTS = variate To save the iterative weights
LINEARPREDICTOR = variate To save the linear predictor
YADJUSTED = variate To save the adjusted dependent variate
I_2LOGLIKELIHOOD = variate To save the contribution of each unit to the value of minus twice the maximized log likelihood
MAXCYCLE = scalar Maximum number of iterations for see-saw algorithm; default 30
TOLERANCE = scalar Convergence criterion; default 10-5


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


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.


Parameter: TERMS.


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.

See also


Commands for: Regression analysis.


        !t('Directions moved by 31 periwinkles as a function of distance',\
        '(Fisher 1993, Statistical Analysis of Circular Data p.160-162).');\
VARIATE [NVALUES=31] distance,direction
READ    distance,direction
 107  67     46  66     33  74     67  61    122  58     69  60     43 100
  30  89     12 171     25 166     37  98     69  60      5 197     83  98
  68  86     38 123     21 165      1 133     71 101     60 105     71  71
  71  84     57  75     53  98     38  83     70  71      7  74     48  91
   7  38     21 200     27  56     :
CALCULATE distance = distance - MEAN(distance)
MODEL     direction
RCIRCULAR [PRINT=#,fittedvalues] distance
Updated on March 6, 2019

Was this article helpful?