[R] biplot breakdown help

Peter Ehlers ehlers at ucalgary.ca
Fri Mar 11 01:37:13 CET 2011

On 2011-03-09 12:14, chris20 wrote:
> Hi,
> I am trying to understand how the biplot.prcomp is constructed so I can
> manipulate it to emphasise particular observations and reduce the number of
> variables shown.
> The prcomp model I have ran has cor=TRUE and scale=TRUE
> I have worked out from looking at str(prcomp.model) that...
> prcomp.model$x = the observations ploted in the biplot
> prcomp.model$rotation = the variables that form the arrows.
> But there appears to be a scaling factor because when I plot
> biplot(prcomp.model$rotation, prcomp.model$x)
> The biplot is slightly off scale compared with biplot(prcomp.model)

Look at the code; it's pretty short.
You may want to compare:

  biplot(prcomp.model, scale=0)
  biplot(prcomp.model$x[, 1:2], prcomp.model$rotation[, 1:2])

Peter Ehlers

> Under ?biplot.prcomp it talks about lambda^scale and lambda^(1-scale) but I
> just can't seem to work it out so that the two biplots look the same. HELP!!
> Thanks
> Chris
> --
> View this message in context: http://r.789695.n4.nabble.com/biplot-breakdown-help-tp3344458p3344458.html
> Sent from the R help mailing list archive at Nabble.com.
> ______________________________________________
> R-help at 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.

More information about the R-help mailing list