Wednesday, 11 September 2013

scores not being generated from princomp, unable to generate biplot

scores not being generated from princomp, unable to generate biplot

I am having issues with princomp, specifically biplot, when I want to use
a covariance or correlation matrix not generated by princomp itself. For
simplicity I will use a much smaller dataset than the one I am dealing
with.
cr <- cw.wt(USArrests)
biplot(princomp(data = USArrests, covmat = cr))
gives me the error
Error in biplot.princomp(princomp(data = USArrests, covmat = cr)) :
object 'princomp(data = USArrests, covmat = cr)' has no scores
Seems like something simple going on here, but google has thus far been
unhelpful.

No comments:

Post a Comment