Re: [R] Using R to Compute Covariance

2014-07-26 Thread Robert Sherry
David, Thanks for the response. I believe you have solved my problem. Bob On 7/26/2014 3:50 PM, David Winsemius wrote: On Jul 26, 2014, at 11:07 AM, Robert Sherry wrote: I have the following data set: xy p 11 1/2 22 1/4 39 1/4 In this ca

Re: [R] Using R to Compute Covariance

2014-07-26 Thread David Winsemius
On Jul 26, 2014, at 11:07 AM, Robert Sherry wrote: I have the following data set: xy p 11 1/2 22 1/4 39 1/4 In this case, p represents the probability of the values occurring. I compute the covariance of x and y by hand and come up with a va

Re: [R] Using R to Compute Covariance

2014-07-26 Thread peter dalgaard
The Details section of ?cov.wt tells you that its divisor is not (n-1) for the "unbiased" method. Or rather, it tells you what it does, and that that amounts to dividing by n-1 _if_ the weights are equal. (I never quite figured out under which sampling/weighting model this estimator is actuall

[R] Using R to Compute Covariance

2014-07-26 Thread Robert Sherry
I have the following data set: xy p 11 1/2 22 1/4 39 1/4 In this case, p represents the probability of the values occurring. I compute the covariance of x and y by hand and come up with a value of 41/16. When computing the covariance, I am divi