Devon McCormick wrote:
is quarterly - and
> I want to find the correlation between the two series.  I thought of three
> ways to do this:

>  1) I could reduce the monthly series and run the correlation between the
> quarterly and every third monthly;

Throws away data: not good.

>  2) I could linearly interpolate the quarterlies to get pseudo-monthlies;

If you are doing interpolation, linear may not be the best.  However, you
don't end up with any more real data than when you started.

>  3) I could compound the monthlies to make them quarterly.

Looks better: at least the expected values are the same.

> So, please figure which way you think is the best and demonstrate why.

I would try correlating a series against itself.

compareCorrQvsM2=: 3 : 0
NB.   qtrly=. <:+:?y$0
   moly=. <:+:?0$~3*y
   qtrly=.(+/%#)"1 ]_3 ]\ moly
   cc=. 3{.corrCoeff qtrly,.moly#~1,2~:/\<.((#moly)%~#qtrly)*i.#moly
   cc=. (corrCoeff (,2 linterpolate"0 qtrly),.moly) 1}cc
   cc=. (corrCoeff qtrly,._3 aggrets\moly) 2}cc
NB.EG compareCorrQvsM 33
)

   compareCorrQvsM2 33
0.521715 0.46196 0.903864


Best wishes,

John



----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to