From: M Ladderman on
dear all,

I want to constrain the crossCorr function to return parameters/solutions between 0-1, because a priori I do not expect any negative relationships.

Is there an easy way to do this that I am overlooking, thanks.
From: M Ladderman on
Is this is a stupid question or is the answer not easy. thanks for reading this mssg again, sorry to move it up in this way but I am struggling with it.


"M Ladderman" <mirresimons(a)gmail.com> wrote in message <hndolo$rqf$1(a)fred.mathworks.com>...
> dear all,
>
> I want to constrain the crossCorr function to return parameters/solutions between 0-1, because a priori I do not expect any negative relationships.
>
> Is there an easy way to do this that I am overlooking, thanks.
From: Wayne King on
"M Ladderman" <mirresimons(a)gmail.com> wrote in message <hni9q0$6ln$1(a)fred.mathworks.com>...
> Is this is a stupid question or is the answer not easy. thanks for reading this mssg again, sorry to move it up in this way but I am struggling with it.
>
>
> "M Ladderman" <mirresimons(a)gmail.com> wrote in message <hndolo$rqf$1(a)fred.mathworks.com>...
> > dear all,
> >
> > I want to constrain the crossCorr function to return parameters/solutions between 0-1, because a priori I do not expect any negative relationships.
> >
> > Is there an easy way to do this that I am overlooking, thanks.

Hi, I guess I would ask why you want to do that? crosscorr() produces an estimate of the theoretical cross correlation, so there will always be some confidence interval around your results. For example, if you crosscorrelate two independent white noise sequences, the cross correlation should be zero for all lags. So a priori you might say I want to constrain the cross correlation sequence to be identically zero. Of course, the estimate returned by crosscorr will not be identically zero for all lags. That's the utility of outputting the confidence bounds. So why not just output the estimate and use the confidence bounds to show your audience what is statistically different and not different from zero?

Other than that, you can always set any negative values in the sample cross correlation function to zero. Simply find those values in XCF that are negative and set them equal to zero. That is easily accomplished with a vector operation in MATLAB. But, as I stated above, I don't see why you want to do that.

Wayne

Wayne
From: Rune Allnor on
On 14 Mar, 10:21, "M Ladderman" <mirresim...(a)gmail.com> wrote:
> Is this is a stupid question or is the answer not easy.

It is a stupid question, for two reasons:

1) The fact that you *expect* correlations in the
range [0,1] have no effects on what *actually*
happens. If your expectations are wrong, the
restriction will prevent you from finding out
the fact.

2) If your expectations are warrented - that there
exists some constraint on the process that forces
the correlation to the range [1,1] - you don't need
to restrict the computational results. The results
will end up in that range anyway.

Rune
From: John D'Errico on
"M Ladderman" <mirresimons(a)gmail.com> wrote in message <hni9q0$6ln$1(a)fred.mathworks.com>...
> Is this is a stupid question or is the answer not easy. thanks for reading this mssg again, sorry to move it up in this way but I am struggling with it.
>
>
> "M Ladderman" <mirresimons(a)gmail.com> wrote in message <hndolo$rqf$1(a)fred.mathworks.com>...
> > dear all,
> >
> > I want to constrain the crossCorr function to return parameters/solutions between 0-1, because a priori I do not expect any negative relationships.
> >
> > Is there an easy way to do this that I am overlooking, thanks.

Rune says it all. Just because you believe something
is true about the correlations does not mean that it
will in fact come out that way.

If wishes were horses, beggars would ride.

If you absolutely want it to happen, and are willing
to "cook the books", then just replace any negative
correlations with zero. Problem solved.

John
John