[R] About princomp

From: Matthieu Cornec <matthieu.cornec_at_gmail.com>
Date: Fri 16 Sep 2005 - 23:51:10 EST


Hi,
 I run the example for princomp for R211 I got the following error for biplot   

> ## The variances of the variables in the
> ## USArrests data vary by orders of magnitude, so scaling is appropriate
> (pc.cr <http://pc.cr> <- princomp(USArrests)) # inappropriate
Erreur dans cov.wt(z) : 'x' must contain finite values only
> princomp(USArrests, cor = TRUE) # =^= prcomp(USArrests, scale=TRUE)
Erreur dans cov.wt(z) : 'x' must contain finite values only
> ## Similar, but different:
> ## The standard deviations differ by a factor of sqrt(49/50)
>
> summary(pc.cr <http://pc.cr> <- princomp(USArrests, cor = TRUE))
Erreur dans cov.wt(z) : 'x' must contain finite values only
> loadings(pc.cr <http://pc.cr>) ## note that blank entries are small but
not zero

Loadings:
Comp.1 Comp.2 Comp.3
Murder 0.663 0.314 0.679
Assault 0.694 -0.715
UrbanPop 0.279 -0.946 0.165

Comp.1 Comp.2 Comp.3
SS loadings 1.000 1.000 1.000
Proportion Var 0.333 0.333 0.333
Cumulative Var 0.333 0.667 1.000
> plot(pc.cr <http://pc.cr>) # shows a screeplot.
> biplot(pc.cr <http://pc.cr>)

Erreur dans plot.window(xlim, ylim, log, asp, ...) : 'xlim' nécessite des valeurs finies
>

        [[alternative HTML version deleted]]



R-help@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 Received on Wed Sep 21 02:17:50 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:14 EST