selectu | R Documentation |
The usage of selectu
depends on one of its arguments, type
. If tyep="seed1"
, the n*F_u is computed for a higher dimension one of X and Y and a proper number of prjections is reported. For example, suppose that the dimension of X is higher than Y. Then selectu(X,Y, type="case1")
and selectu(Y, X, u=5, type="case1")
gives the same results, and it is for X. If type="seed2"
, n*F_u is computed for X and Y and proper numbers of projections for X and Y are reported. And, For type="seed2"
, num.d
must be specified. Its defualt value is 2. The argument eps
is a terminating condition for stopping projections. The projection is stopped, when the increment is less than the value of eps
. The argument auto.stop=TRUE
has the function automatically stopped as soon as the increment is less than the value of eps
. If not, the increments are computed until the value of u.max
is reached. The function selectu
results in subclass "selectu".
selectu(X, Y, type="seed2", u.max=30, auto.stop=TRUE, num.d=2, eps=0.01)
X |
numeric matrix (n * p), the first set of variables |
Y |
numeric matrix (n * r), the second set of variables |
type |
character, the default is "seed2". "seed1" is for the first case of Seeded CCA (One set of variable is initially-reduced). "seed2" is for the second case of Seeded CCA (Two sets of variables are initially reduced). |
u.max |
numeric, t he maximum number of u. The default is equal to 30. |
auto.stop |
logical, The default value is TRUE. If TRUE, the iterative projection is automatically stopped, when the terminaion condition eps is satisfied. If FALSE, the iterative projections are stopped at the value of u.max. |
num.d |
numeric, the number of the "num.d" largest eigenvectors of cov(first.set, second.set), if case1=FALSE. The default value is equal to 2. This option works only for type="seed2". |
eps |
numeric, the default value is equal to 0.01. A value for terminating the projection. |
The order of the values depending on type is follows:
type="seed1"
type="seed2"
type="seed1" |
Values with selecting |
nFu |
incrments (n*Fu) of the iterative projection for initally reduction one set of variable. |
proper.u |
proper value of the number of projections for X |
type |
types of seeded CCA |
eps |
a value for terminating the projection. The default value is equal to 0.01. |
type="seed2" |
Values with selecting |
nFu.x |
incrments (n*Fu) of the iterative projection for initially reducing X. |
nFu.y |
incrments (n*Fu) of the iterative projection for initially reducing Y. |
proper.ux |
proper value of the number of projections for X |
proper.uy |
proper value of the number of projections for Y |
type |
types of seeded CCA |
eps |
a value for terminating the projection. The default value is equal to 0.01. |
###### data(cookie) ###### data(cookie) myseq<-seq(141,651,by=2) X<-as.matrix(cookie[-c(23,61),myseq]) Y<-as.matrix(cookie[-c(23,61),701:704]) selectu(X, Y, type="seed1") selectu(X, Y, type="seed1", auto.stop=FALSE) selectu(X, Y, type="seed2", eps=0.001, num.d=3) selectu(X, Y, type="seed2", auto.stop=FALSE) ######## data(nutrimouse) ######## data(nutrimouse) Y<-as.matrix(nutrimouse$lipid) X<-as.matrix(nutrimouse$gene) selectu(X, Y, type="seed2", num.d=4) selectu(X, Y, type="seed2", num.d=4, eps=0.001) selectu(X, Y, type="seed2", auto.stop=FALSE, num.d=4, eps=0.001)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.