Description Usage Arguments Details Value Examples

Regularized parameters search method for "msma".

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
regparasearch(
X,
Y = NULL,
Z = NULL,
eta = 1,
type = "lasso",
inX = NULL,
inY = NULL,
inXsup = NULL,
inYsup = NULL,
muX = 0,
muY = 0,
comp = 1,
nfold = 5,
maxrep = 3,
minpct = 0,
maxpct = 1,
criterion = c("CV", "BIC")[1],
whichselect = NULL,
homo = NULL,
intseed = 1
)
## S3 method for class 'regparasearch'
print(x, ...)
``` |

`X` |
a matrix or list of matrices indicating the explanatory variable(s). This parameter is required. |

`Y` |
a matrix or list of matrices indicating objective variable(s). This is optional. If there is no input for Y, then PCA is implemented. |

`Z` |
a vector, response variable(s) for implementing the supervised version of (multiblock) PCA or PLS. This is optional. The length of Z is the number of subjects. If there is no input for Z, then unsupervised PLS/PCA is implemented. |

`eta` |
numeric scalar indicating the parameter indexing the penalty family. This version contains only choice 1. |

`type` |
a character, indicating the penalty family. In this version, only one choice is available: "lasso." |

`inX` |
a (list of) numeric vector to specify the variables of X which are always in the model. |

`inY` |
a (list of) numeric vector to specify the variables of X which are always in the model. |

`inXsup` |
a (list of) numeric vector to specify the blocks of X which are always in the model. |

`inYsup` |
a (list of) numeric vector to specify the blocks of Y which are always in the model. |

`muX` |
a numeric scalar for the weight of X for the supervised case. 0 <= muX <= 1. |

`muY` |
a numeric scalar for the weight of Y for the supervised case. 0 <= muY <= 1. |

`comp` |
numeric scalar for the maximum number of componets to be considered. |

`nfold` |
number of folds. Default is 5. |

`maxrep` |
numeric scalar for the number of iteration. |

`minpct` |
percent of minimum candidate parameters. |

`maxpct` |
percent of maximum candidate parameters. |

`criterion` |
a character, the evaluation criterion, "CV" for cross-validation, based on a matrix element-wise error, and "BIC" for Bayesian information criteria. The "BIC" is the default. |

`whichselect` |
which blocks selected. |

`homo` |
same parameters. |

`intseed` |
seed number for the random number in the parameter estimation algorithm. |

`x` |
an object of class " |

`...` |
further arguments passed to or from other methods. |

This is a function for identifying the regularized parameters of sparseness lambdaX and lambdaY for `msma`

. The initial range of candidates is computed based on fit, with regularized parameter values of 0. A binary search is conducted for dividing the parameter range into two regions. The representative value for the region is a median value, and the optimal region is selected using the minimum criteria obtained from the fit with that median value. The CV error or BIC can be used as criteria. The selected region is also divided into two region and the same process is iterated by maxrep times. Thus, the final median value in the selected region is set to be the optimal regularized parameter. The search is conducted with combinations of parameters for X and Y. The range of candidates for regularized parameters can be restricted, with a percentile of the limit (minimum or maximum) for the range.

`optlambdaX` |
Optimal parameters for X |

`optlambdaY` |
Optimal parameters for Y |

`mincriterion` |
Minimum of criterion values |

`criterions` |
Resulting criterion value |

`pararange` |
Range of candidates parameters |

1 2 3 4 5 6 7 8 9 10 11 12 | ```
##### data #####
tmpdata = simdata(n = 50, rho = 0.8, Yps = c(10, 12, 15), Xps = c(20, 15), seed=1)
X = tmpdata$X; Y = tmpdata$Y
##### Regularized parameters search #####
opt1 = regparasearch(X, Y, comp=1, criterion="BIC", maxrep=2,
whichselect=c("X", "Y", "Xsup", "Ysup"))
opt1
fit4 = msma(X, Y, comp=1, lambdaX=opt1$optlambdaX, lambdaY=opt1$optlambdaY,
lambdaXsup=opt1$optlambdaXsup, lambdaYsup=opt1$optlambdaYsup)
fit4
summary(fit4)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.