s to construct some toy data. Even if imperfect, people will work
> to
> > help you. Maybe show us some of your actual data.
> >
> > ** **
>
> >
> > Of course, if a and b1 are really scalars, I donât think there is such a
> > thing as the covariance between two scalars
> >
>
ours,
Â
Mark J. Lamias
From: huang jialin
To: "Doran, Harold"
Cc: "r-help@r-project.org"
Sent: Monday, March 12, 2012 12:08 PM
Subject: Re: [R] how to calculate a variance and covariance matrix for a vector
Doran,
Thanks for your advice.
Since
.@gmail.com]
> *Sent:* Monday, March 12, 2012 11:53 AM
> *To:* Doran, Harold
> *Cc:* r-help@r-project.org
> *Subject:* Re: [R] how to calculate a variance and covariance matrix for
> a vector
>
> ** **
>
> Hi,
>
> ** **
>
> Thanks for your response.
between two scalars
From: huang jialin [mailto:huangps...@gmail.com]
Sent: Monday, March 12, 2012 11:53 AM
To: Doran, Harold
Cc: r-help@r-project.org
Subject: Re: [R] how to calculate a variance and covariance matrix for a vector
Hi,
Thanks for your response.
I tried to use cov() before, but
ect.org]
> On
> > Behalf Of huang jialin
> > Sent: Monday, March 12, 2012 11:43 AM
> > To: r-help@r-project.org
> > Subject: [R] how to calculate a variance and covariance matrix for a
> vector
> >
> > Hello,
> >
> > I have a vector {a, b1, b2, b3
Behalf Of huang jialin
> Sent: Monday, March 12, 2012 11:43 AM
> To: r-help@r-project.org
> Subject: [R] how to calculate a variance and covariance matrix for a vector
>
> Hello,
>
> I have a vector {a, b1, b2, b3, b4}. How can I calculate the following
> matrix:
>
>
On Mon, Mar 12, 2012 at 11:42 AM, huang jialin wrote:
> Hello,
>
> I have a vector {a, b1, b2, b3, b4}.
What does this mean? Is this a character vector giving names of
objects that exist elsewhere in the workspace? Else, how do you tell
a/b1/b2 apart in a vector?
You probably want ?cov but apply
?cov
HTH,
Jorge.-
On Mon, Mar 12, 2012 at 11:42 AM, huang jialin <> wrote:
> Hello,
>
> I have a vector {a, b1, b2, b3, b4}. How can I calculate the following
> matrix:
>
> var(a) cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4)
> cov(a, b1) var(b1) cov(a, b2) cov(a, b3) cov(a, b4)
> ...
> ..
Hello,
I have a vector {a, b1, b2, b3, b4}. How can I calculate the following
matrix:
var(a) cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4)
cov(a, b1) var(b1) cov(a, b2) cov(a, b3) cov(a, b4)
...
...
cov(a, b1) cov(a, b2) cov(a, b3) cov(a, b4) var(b4)
I would very appreciate your inputs.
9 matches
Mail list logo