[R] Biplot

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun May 13 16:08:06 CEST 2007


The PCA of two variables out of three is unrelated to the PCA of all 
three, so your example code does not do what you describe.

If you want to plot two of the components of a full PCA, see
?biplot.princomp: and note that it says this is not a true biplot for 
other than the first two components.

(And really you should have been able to find this yourself: please do 
study the posting guide.)

On Sun, 13 May 2007, Soare Marcian-Alin wrote:

> Hello everybody,
>
> How could I extract the components of of a PCA to plot it into a biplot?
> I want to make pairwise biplots of the first three main components:
>
> biplot(princomp(x, cor=TRUE))
> biplot(princomp(x[,c(1,2)], cor=TRUE))
> biplot(princomp(x[,c(1,3)], cor=TRUE))
> biplot(princomp(x[,c(2,3)], cor=TRUE))
>
> Is this the only way, how I could plot them?
> I thought, that it could be possible to extract them of the full PCA ..
>
> KR,
> Alin
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch 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.
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list