Re: [R] Correlation Help

From: stephen sefick <ssefick_at_gmail.com>
Date: Mon, 23 Jun 2008 15:40:31 -0400

?cor
you can't calculate a correlation on a missing data point. I think you need to use the argument use=pairwise.complete.obs in the cor call, but look at the function description it will tell you what you need to know (I think). Also, search the list-R nabble, Rsitsearch, or ... Good Luck

Stephen

On Mon, Jun 23, 2008 at 3:31 PM, Tong, Michael <MTONG_at_templeton.com> wrote:

> Hi,
>
> I have recently been using the R program and encountered a recurring
> problem. I have been trying calculate the correlation of a 16 column table.
> Everytime I type in cor(test), where test is data that I uploaded into R
> using the read.table function, I get an error:
>
> Error in cor(test) : missing observations in cov/cor
> In addition: Warning message:
> In cor(test) : NAs introduced by coercion
>
> Can anyone tell me what I am doing wrong and what I need to do to correct
> this?
>
> Also I intend on running the T-Stats, P-Stats, Information Coefficient and
> Information Ratios once I get the correlation table calculated. If you know
> which packages, if any, have are able to calculate this, that would be
> helpful.
>
> Thanks.
>
> Best,
>
> Michael Tong
> Futures Associate
> Quantitative Research Services
> Franklin Templeton Investments, Inc.
> 600 Fifth Ave
> New York, NY 10020
> (212) 632-4254
> mtong_at_templeton.com
>
> Notice: All email and instant messages (including attachments) sent to
> or from Franklin Templeton Investments (FTI) personnel may be retained,
> monitored and/or reviewed by FTI and its agents, or authorized
> law enforcement personnel, without further notice or consent.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Let's not spend our time and resources thinking about things that are so
little or so large that all they really do for us is puff us up and make us
feel like gods. We are mammals, and have not exhausted the annoying little
problems of being mammals.

-K. Mullis

	[[alternative HTML version deleted]]

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Mon 23 Jun 2008 - 19:43:22 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 23 Jun 2008 - 20:32:58 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive