From: Wayne King on 24 May 2010 08:28 "Rogelio" <rogelio.a.mancisidor(a)student.bi.no> wrote in message <htdqgh$cvr$1(a)fred.mathworks.com>... > ok, which book do you have? where did you read that the crosscorrelation follows a t student distribution? > you dont want to use corrcoeff function, that will compute the sample correlation between two variables. What you want is to compute the crosscorrelation between two variables taking into account the pass of time. Use crosscorr function, and just specify the first 3 inputs. Then let the value of the crosscorrelation be x_h, where h is the lag time, the pvalues that you want are obtained as 1 - tstudentcdf (x_h,n-2). But you need to be aware of what you are doing and how to interprete pvalues. As I mentioned before, by using crosscorr you will get the confidence intervals so you can reject or not the crosscorrelation hypothesis. However, the intervals in matlab, if im not mistaking, are based in a N(0,1/sqrt(N)), the asympthotic distribution of the crosscorrelation. > > > "elsa " <elsa_siggiridou(a)hotmail.com> wrote in message <htdaq2$biv$1(a)fred.mathworks.com>... > > thank you rogelio for your answer! > > I want to do exactly this. I know that the cross correlation follows t-student distribution with n-2 degrees of freedom. I want to do a test- hypothesis if the cross correlation is 0 for each delay so my time series are uncorrelated. For τ=0 there is > > [P B]=corrcoeff(A1,A2) where A1 and A2 is vector time serries,B is a matrix with correlation coefficients, and P is the p-value.And i try to calculate the p-values for the other delays with the crosscorr() but this doesn't calculate the p-values an i try to construct a function for this! Hi, I agree with Rogelio, you want to estimate the cross correlation sequence and place confidence bounds on that sequence as Rogelio suggested. If you don't have the Econometrics toolbox, but have the Signal Processing Toolbox, use xcorr to estimate the cross correlation sequence. Wayne
From: elsa on 24 May 2010 09:00 ok thanks for your help! I don't understand why i will take the sequence of cross correlation but i will try to apply. The correlation coefficient is a special case of cross correlation when delay is τ=0 and i found on the internet that we transforme to a t-statistic which follows t-student distribution with n-2 degrees of freedom. really now i am comfused!! so never mind, thank you for your interest!!
From: Rogelio on 25 May 2010 02:22 Ok, if your are interested in lag h=0 then you can use the first function that you mentioned. But the concept of crosscorrealtion in time series is different to the concept of correlation coefficient between two variables. Since you mentioned that you are working with time series and you used the word crosscorrelation i thought you were interested to different lag values. I suggest you to read a bit about crosscorrelation and correlation coefficient, as well as pvalues, then you can clear your mind and uderstand what you really need for your thesis. "elsa " <elsa_siggiridou(a)hotmail.com> wrote in message <htdt9a$ecl$1(a)fred.mathworks.com>... > ok thanks for your help! > > I don't understand why i will take the sequence of cross correlation but i will try to apply. The correlation coefficient is a special case of cross correlation when delay is τ=0 and i found on the internet that we transforme to a t-statistic which follows t-student distribution with n-2 degrees of freedom. > really now i am comfused!! > > so never mind, thank you for your interest!!
First
|
Prev
|
Pages: 1 2 Prev: Creating a vector from sub vector Next: How to get application root path? |