[R] More variables on pca

2004-02-19 Thread weidong zhang
Hi, When I have more variables than units, e.g. a 10x20 data frame with 20 variables. princomp can't do pca on variables. prcomp from mva package can do th etrick but gave 10 principal components. Should we expect 20 for this case? Thanks in advance, Weidong

[R] CP for rpart

2003-09-29 Thread weidong zhang
Hi All, I have some questions on using library rpart. Given my data below, the plotcp gives me increasing 'xerrors' across different cp's with huge xstd (plot attached). What causes the problem or it's not a problem at all? I am thinking 'xerror's should be decreasing when 'cp' gets smaller.

[R] Error on mclust

2003-08-06 Thread weidong zhang
Hi All, I am trying to cluster a one-dimensional data (see the file attached) using Mclust() but got an error message like: Mclust(x) Error in rep(1, n) : Object n not found When I do a simulation sometimes it works sometimes doesn't. Mclust(c(rnorm(50),rnorm(56,-0.5))) Error in rep(1, n) :