Assuming you want "ordinary" correlations - Pearson or Spearman - and
not
some financial thing I've never heard of, searching the help for correlation
would have gotten you to cor(), and probably also to other more elaborate
constructions.
If your problem is more complex than that, we need a better description
of the difficulty, along with example code for as far as you can get yourself.
Sarah
On Wed, Feb 11, 2009 at 5:44 AM, Maithili Shiva
<maithili_shiva at yahoo.com> wrote:> Dear R helpers,
>
> I have generated a portfolio of Equity, Dollar Rate and say zero coupon
bond. I have calculated the daily returns based on the prices available for last
two years.
>
> Now, I have three seperate csv files (Equity.csv, Dollar.csv and Bond.csv)
containing the respective returns. I need to calculate the correlation matrix
between the retuns of these assets. Please guide me how this can be done in R.
>
> I have attached the three csv files.
>
> Thanking in advance
>
> With regards
>
> Maithili
>
>
>
>
--
Sarah Goslee
http://www.functionaldiversity.org