The help and its examples are very comprehensive here. The usage you cite shows 
exactly what you need to do

From: Alaios [mailto:ala...@yahoo.com]
Sent: Thursday, November 18, 2010 1:30 PM
To: Doran, Harold
Subject: RE: [R] Sample covariance matrix in R


Checked that
Usage
covr(x, y = NULL, na.rm = FALSE, use)

as you can see expectes two inputs ,,, or one with two columns..

I also found intresting this
The denominator n - 1 is used which gives an unbiased estimator of the 
(co)variance for i.i.d. observations\

but I do not know how to use this inside the cov to get wjhat I am lloking for.

Regards
Alex



--- On Thu, 11/18/10, Doran, Harold <hdo...@air.org> wrote:

From: Doran, Harold <hdo...@air.org>
Subject: RE: [R] Sample covariance matrix in R
To: "Alaios" <ala...@yahoo.com>, "Rhelp" <r-help@r-project.org>
Date: Thursday, November 18, 2010, 6:26 PM
Alex:

?cov

> -----Original Message-----
> From: 
> r-help-boun...@r-project.org</mc/compose?to=r-help-boun...@r-project.org> 
> [mailto:r-help-boun...@r-project.org</mc/compose?to=r-help-boun...@r-project.org>]
>  On
> Behalf Of Alaios
> Sent: Thursday, November 18, 2010 12:54 PM
> To: Rhelp
> Subject: [R] Sample covariance matrix in R
>
> Hello everyone.
> I would like to find the sample covariance matrix using R.
>
> So far I read on the wikipedia what a sample_covariance is
> http://en.wikipedia.org/wiki/Sample_covariance
>
> according to wikipedia one vector is enough to calculate the sample covariance
> matrix.
> In R I tried cov(myvector) and I get the reply that I need to pass either two
> argument or one matrix with x,y values .
>
> How can I find the sample covariance matrix?
>
> Best Regards
> Alex
>
>
>
>
>
>     [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org</mc/compose?to=r-h...@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.



        [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to