Ellipse in PCA with parameters "a" and "b"defined.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Ellipse in PCA with parameters "a" and "b"defined.

mary
Hi,
I have to construct an ellipse interval region on a PCAbiplot, I have my parameters "a" and "b" and I would apply the formula:

draw.ellipse(x, y, a = , b = )

I have done a PCA on my data so I have my scores and loading for the first and second component, but my answer is what I have to choose as X and Y into the formula?
if "a" and "b" are scalars or vectors should be x and y scalars or vectors too?

Thanks
Mary
Reply | Threaded
Open this post in threaded view
|

Re: Ellipse in PCA with parameters "a" and "b"defined.

Jim Lemon
On 01/22/2013 11:12 AM, mary wrote:

> Hi,
> I have to construct an ellipse interval region on a PCAbiplot, I have my
> parameters "a" and "b" and I would apply the formula:
>
> draw.ellipse(x, y, a = , b = )
>
> I have done a PCA on my data so I have my scores and loading for the first
> and second component, but my answer is what I have to choose as X and Y into
> the formula?
> if "a" and "b" are scalars or vectors should be x and y scalars or vectors
> too?
>
Hi Mary,
If this is draw.ellipse from the plotrix package, there should be an x
and y corresponding to each pair of a and b. I was unable to work out
which PCA biplot function you are using, so I am not sure whether the
plots are drawn in base graphics. If not, you might have some problems
with the x and y coordinates.

Jim

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: Ellipse in PCA with parameters "a" and "b"defined.

mary
Ok...
so, in my model my "a"  is built using the standard deviation of the first principal component and "b" with the second, so my "x" and "Y" should be :
 PCA $ scores [, 1], PCA $ scores [, 2]
but in this way I do not get out a confidence interval set on my parameters but many ellipses.

Thanks
Mary
Reply | Threaded
Open this post in threaded view
|

Re: Ellipse in PCA with parameters "a" and "b"defined.

David Carlson
Try x <- mean(PCA$scores[,1]) and y <- mean(PCA$scores[,2]) which should be
the same as x <- 0, y <- 0 within rounding error.

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352

> -----Original Message-----
> From: [hidden email] [mailto:r-help-bounces@r-
> project.org] On Behalf Of mary
> Sent: Tuesday, January 22, 2013 3:40 AM
> To: [hidden email]
> Subject: Re: [R] Ellipse in PCA with parameters "a" and "b"defined.
>
> Ok...
> so, in my model my "a"  is built using the standard deviation of the
> first
> principal component and "b" with the second, so my "x" and "Y" should
> be :
>  PCA $ scores [, 1], PCA $ scores [, 2]
> but in this way I do not get out a confidence interval set on my
> parameters
> but many ellipses.
>
> Thanks
> Mary
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Ellipse-in-
> PCA-with-parameters-a-and-b-defined-tp4656215p4656242.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> [hidden email] 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.

______________________________________________
[hidden email] 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 | Threaded
Open this post in threaded view
|

Re: Ellipse in PCA with parameters "a" and "b"defined.

mary
thank you David,
it was my first idea, but i don't know if it is right statistically speaking!!!