Skip to content

determine non-linear correlation

5 messages · Liviu Andronic, Mark Breman, Stefan Grosse +1 more

#
On Wed, Jun 3, 2009 at 9:15 PM, Mark Breman <m.breman at yahoo.com> wrote:
What about non-parametric correlation coefficients? They are based on
ranks, and should detect any monotonic relationship between the time
series. Check ?cor and ?cor.test methods "spearman" and "kendall", and
also the Wikipedia articles for further references.

Best,
Liviu

  
    
#
On Wed, 3 Jun 2009 12:15:17 -0700 (PDT) Mark Breman
<m.breman at yahoo.com> wrote:
MB> I would like to know if two financial time-series are nonlinear
MB> correlated, and if so, what that correlation function is. Is there
MB> an easy way to do this with R?

Maybe you should be more specific about what you want to do? Test for
nonlinear cointegration? If that is the case:

http://cran.r-project.org/web/views/TimeSeries.html
is a starter. 


Stefan
1 day later
#
Well the term nonlinear is always a little bit misleading as it can 
include really different alternatives! Can you provide a reference to 
the thesis you were mentioning?

I think one of the question you have to ask for first is whether your 
variables are stationary or not.

If they are, I would try to include in a regression the nonlinearity you 
suspect, and then interpreting individual coefficients or the Rsquared 
as nonlinear correlation. I found actually a similar answer on a similar 
question on:
https://stat.ethz.ch/pipermail/r-help/2008-March/156284.html Note that 
you would maybe have to use HAC covariance estimators if you want to 
make some inference, as you are dealing with time-series, see package 
sandwich.

If the variables are not stationary and I(1), you could indeed check for 
nonlinear cointegration. This is possible in the dev version of package 
tsdyn who allows to estimate and test for threshold cointegration (btw, 
I will make a presentation on this subject at userR 2009). Other types 
of nonlinear cointegration are to my knowledge not implemented in R. You 
can find much literature on smooth transition cointegration, and a 
general treatment is done in Park, Joon Y & Phillips, Peter C B, 2001. 
"Nonlinear Regressions with Integrated Time Series," Econometrica, vol. 
69(1), pages 117-61,

Matthieu

Stefan Grosse a ?crit :