## Use the example dataset
data(asmbPLS.example)
X.matrix = asmbPLS.example$X.matrix
Y.matrix = asmbPLS.example$Y.matrix
PLS.comp = asmbPLS.example$PLS.comp
X.dim = asmbPLS.example$X.dim
quantile.comb.table.cv = asmbPLS.example$quantile.comb.table.cv
Y.indicator = asmbPLS.example$Y.indicator
## cv to find the best quantile combinations for model fitting
cv.results <- asmbPLS.cv(X.matrix = X.matrix,
Y.matrix = Y.matrix,
PLS.comp = PLS.comp,
X.dim = X.dim,
quantile.comb.table = quantile.comb.table.cv,
Y.indicator = Y.indicator,
k = 5,
ncv = 3)
quantile.comb <- cv.results$quantile_table_CV[,1:length(X.dim)]
n.PLS <- cv.results$optimal_nPLS
## asmbPLS fit
asmbPLS.results <- asmbPLS.fit(X.matrix = X.matrix,
Y.matrix = Y.matrix,
PLS.comp = n.PLS,
X.dim = X.dim,
quantile.comb = quantile.comb)
Run the code above in your browser using DataLab