Assessing correlation with a variable in degrees This is probably a fairly simple question but it occurred to me, when trying to go through some data, that I wasn't sure how.
Say you have some numeric variable vs. arc degrees-- like the price of real estate when looking in any direction. You want to see if there is a quadratic correlation between these two. In other words, the hypothesis is that land is most expensive in one direction, then gets less expensive -180 degrees away. 
What's the standard way to treat or transform degrees, i.e. a repeating or circular variable?
There is a somewhat related question here but it also involves other things, and I don't see how the scale function in R applies here.
 A: There are three ways to approach this: 


*

*Predict direction by price

*Predict price by direction

*Compute a circular-linear correlation coefficient


The first requires circular regression, the second a transformation of the circular variable and any ordinary linear regression, and the third is not implemented in any statistical package as far as I'm aware but can proceed as described in this paper.
The second approach seems most appropriate (as interest is in price most likely), so I'll describe it here. Denote the directional outcome as $\theta,$ and compute two transformed variables $\cos(\theta)$ and $\sin(\theta).$ Then, simply perform a linear regression where $\cos(\theta)$ and $\sin(\theta)$ are the predictor variables, so where $$\hat{y} = \alpha + \beta_1 \cos(\theta) + \beta_2 \sin(\theta),$$ where $\alpha$ is an intercept. The expained variance $R^2$ can be treated as an analogue to the squared correlation coefficient. 
A: Kees' answer is the standard way I was taught to transform a cyclic variable, although note you pay for the transformation with extra parameters to estimate.
I just wanted to add that I've seen the Wrapped Cauchy Distribution used in an application in animal ecology, modelling the turning directions of wildebeest (they tend to make turns relative to the direction they are already facing, i.e 180 degree turn is very unlikely).  
This distrbution can work directly with your angles, no transformation required.  Although I'm not sure if it's useful to your specific example above.
EDIT:  Should have mentioned that there are other wrapped distributions out there.  See https://en.wikipedia.org/wiki/Wrapped_distribution
