diff --git a/DESCRIPTION b/DESCRIPTION index f4bb95f..198e650 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,12 +1,12 @@ Package: mdatools Title: Multivariate Data Analysis for Chemometrics -Version: 0.7.0 -Date: 2015-11-30 +Version: 0.7.1 +Date: 2016-05-02 Author: Sergey Kucheryavskiy Maintainer: Sergey Kucheryavskiy Description: Package implements projection based methods for preprocessing, exploring and analysis of multivariate data used in chemometrics. License: GPL-3 -Imports: methods -RoxygenNote: 5.0.0 - +Imports: + methods +RoxygenNote: 5.0.1 diff --git a/NAMESPACE b/NAMESPACE index 8faba8e..b7ec15f 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,4 +1,4 @@ -# Generated by roxygen2 (4.1.1): do not edit by hand +# Generated by roxygen2: do not edit by hand S3method(as.matrix,classres) S3method(as.matrix,ldecomp) diff --git a/NEWS b/NEWS index e8c7791..1b4c82f 100755 --- a/NEWS +++ b/NEWS @@ -1,3 +1,11 @@ +v.0.7.1 +======= +* fixed an issue lead to plot.new() error in some cases +* documentation was regenerated with new version of Roxygen +* file People.RData was renamed to people.RData +* NIPALS method for PCA has been added +* code optimization to speed calculations up + v.0.7.0 ======= * interval PLS variable selection (iPLS) is implemented diff --git a/R/ldecomp.R b/R/ldecomp.R index 579a1f1..699cddf 100755 --- a/R/ldecomp.R +++ b/R/ldecomp.R @@ -244,8 +244,7 @@ ldecomp.getResLimits = function(eigenvals, nobj, ncomp, alpha = 0.05) { if (i < nvar) { - evals = eigenvals[(i + 1):nvar] - + evals = eigenvals[(i + 1):nvar] cl = 2 * conflim - 100 t1 = sum(evals) t2 = sum(evals^2) diff --git a/R/mdaplots.R b/R/mdaplots.R index 519a5d4..9ab1996 100755 --- a/R/mdaplots.R +++ b/R/mdaplots.R @@ -1151,6 +1151,13 @@ mdaplotg = function(data, type = 'p', pch = 16, lty = 1, lwd = 1, bwd = 0.8, if (is.null(yticks) && !is.null(yticklabels)) yticks = 1:length(yticklabels) + # check if plot.new() should be called first + tryCatch( + {par(new = TRUE)}, + warning = function(w){plot.new()}, + finally = {par(new = FALSE)} + ) + # calculate limits and get colors lim = mdaplot.getAxesLim(data, show.lines = show.lines, single.x = single.x, show.legend = show.legend, legend = legend, show.labels = show.labels, diff --git a/R/pca.R b/R/pca.R index cf29d2b..735fef4 100755 --- a/R/pca.R +++ b/R/pca.R @@ -18,13 +18,11 @@ #' @param alpha #' significance level for calculating limit for Q residuals. #' @param method -#' method to compute principal components. +#' method to compute principal components ('svd', 'nipals'). #' @param info #' a short text line with model description. #' #' @details -#' So far only SVD (Singular Value Decompisition) method is available, more coming soon. -#' #' By default \code{pca} uses number of components (\code{ncomp}) as a minimum of number of #' objects - 1, number of variables and default or provided value. Besides that, there is also #' a parameter for selecting an optimal number of components (\code{ncomp.selected}). The optimal @@ -171,7 +169,7 @@ pca = function(x, ncomp = 15, center = T, scale = F, cv = NULL, x.test = NULL, #' getCalibrationData.pca = function(obj, ...) { - x = obj$calres$scores %*% t(obj$loadings) + obj$calres$residuals + x = tcrossprod(obj$calres$scores, obj$loadings) + obj$calres$residuals if (is.numeric(attr(x, 'prep:scale'))) x = sweep(x, 2L, attr(x, 'prep:scale'), '*', check.margin = F) @@ -326,7 +324,7 @@ pca.mvreplace = function(x, center = T, scale = F, maxncomp = 7, scoresp = scores loadings = res$loadings[, 1:ncomp] scores = x.rep %*% loadings - x.new = scores %*% t(loadings) + x.new = tcrossprod(scores, loadings) # remove centering x.new = sweep(x.new, 2L, lmean, '+', check.margin = F) @@ -366,7 +364,7 @@ pca.mvreplace = function(x, center = T, scale = F, maxncomp = 7, #' @param scale #' logical, do standardization or not #' @param method -#' algorithm for compiting PC space (only 'svd' is supported so far) +#' algorithm for compiting PC space (only 'svd' and 'nipals' are supported so far) #' #' @return #' an object with calibrated PCA model @@ -374,7 +372,13 @@ pca.mvreplace = function(x, center = T, scale = F, maxncomp = 7, pca.cal = function(x, ncomp, center = T, scale = F, method = 'svd') { x = prep.autoscale(x, center = center, scale = scale) - model = pca.svd(x, ncomp) + + if (method == 'svd') + model = pca.svd(x, ncomp) + else if(method == 'nipals') + model = pca.nipals(x, ncomp) + else + stop('Wrong value for PCA method!') model$tnorm = sqrt(colSums(model$scores ^ 2)/(nrow(model$scores) - 1)); @@ -456,23 +460,25 @@ pca.nipals = function(x, ncomp) while (th > 0.000001) { - p = (t(E) %*% t) / as.vector((t(t) %*% t)) - p = p / as.vector(t(p) %*% p) ^ 0.5 - t = (E %*% p)/as.vector(t(p) %*% p) - th = abs(tau - as.vector(t(t) %*% t)) - tau = as.vector(t(t) %*% t) + p = crossprod(E, t) / as.vector(crossprod(t)) + p = p / as.vector(crossprod(p)) ^ 0.5 + t = (E %*% p)/as.vector(crossprod(p)) + th = abs(tau - as.vector(crossprod(t))) + tau = as.vector(crossprod(t)) } - - E = E - t %*% t(p) + + E = E - tcrossprod(t, p) scores[, i] = t loadings[, i] = p eigenvals[i] = tau / (nobj - 1) } - + + s = svd(E) + res = list( loadings = loadings, scores = scores, - eigenvals = eigenvals + eigenvals = c(eigenvals, (s$d[1:(nvar - ncomp + 1)]^2)/(nrow(x) - 1)) ) } @@ -564,7 +570,7 @@ predict.pca = function(object, x, cv = F, ...) { x = prep.autoscale(x, object$center, object$scale) scores = x %*% object$loadings - residuals = x - scores %*% t(object$loadings) + residuals = x - tcrossprod(scores, object$loadings) if (cv == F) { diff --git a/R/pls.R b/R/pls.R index 4a943ef..6acea11 100755 --- a/R/pls.R +++ b/R/pls.R @@ -448,13 +448,12 @@ pls.simpls = function(x, y, ncomp, cv = FALSE) for (n in 1:ncomp) { # get the dominate eigenvector of A'A - e = eigen(t(A) %*% A) + e = eigen(crossprod(A)) q = e$vectors[1:nresp] - # calculate and store weights w = A %*% q - c = t(w) %*% M %*% w + c = crossprod(w, (M %*% w)) w = w/sqrt(as.numeric(c)) W[, n] = w @@ -463,18 +462,18 @@ pls.simpls = function(x, y, ncomp, cv = FALSE) P[, n] = p # calculate and store y loadings - q = t(A) %*% w + q = crossprod(A, w) Q[, n] = q v = C %*% p - v = v/sqrt(as.numeric(t(v) %*% v)) + v = v/sqrt(as.numeric(crossprod(v))) # calculate and store regression coefficients - B[, n, ] = W[, 1:n, drop = FALSE] %*% t(Q[, 1:n, drop = FALSE]) + B[, n, ] = tcrossprod(W[, 1:n, drop = FALSE], Q[, 1:n, drop = FALSE]) # recalculate matrices for the next compnonent - C = C - v %*% t(v) - M = M - p %*% t(p) + C = C - tcrossprod(v) + M = M - tcrossprod(p) A = C %*% A if (cv == F && e$value < 10^-12) { diff --git a/README.md b/README.md index 3d113a5..d319c2d 100755 --- a/README.md +++ b/README.md @@ -10,10 +10,10 @@ For more details and examples read a [GitBook tutorial](http://svkucheryavski.gi How to install -------------- -The package now is available from CRAN by usual installing procedure. However due to restrictions in CRAN politics regarding number of submissions (one in 3-4 month) only major releases will be published there. To get the latest release plase use GitHub sources. You can [download](https://github.com/svkucheryavski/mdatools/releases) a zip-file with source package and install it using the `install.packages` command, e.g. if the downloaded file is `mdatools_0.7.0.tar.gz` and it is located in a current working directory, just run the following: +The package now is available from CRAN by usual installing procedure. However due to restrictions in CRAN politics regarding number of submissions (one in 3-4 month) only major releases will be published there. To get the latest release plase use GitHub sources. You can [download](https://github.com/svkucheryavski/mdatools/releases) a zip-file with source package and install it using the `install.packages` command, e.g. if the downloaded file is `mdatools_0.7.1.tar.gz` and it is located in a current working directory, just run the following: ``` -install.packages('mdatools_0.7.0.tar.gz') +install.packages('mdatools_0.7.1.tar.gz') ``` If you have `devtools` package installed, the following command will install the latest release from the master branch of GitHub repository (do not forget to load the `devtools` package first): diff --git a/man/as.matrix.classres.Rd b/man/as.matrix.classres.Rd index c45dbbe..a8dae69 100755 --- a/man/as.matrix.classres.Rd +++ b/man/as.matrix.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{as.matrix.classres} \alias{as.matrix.classres} @@ -16,7 +16,7 @@ \item{...}{other arguments} } \description{ -Generic \code{as.matrix} function for classification results. Returns matrix with performance +Generic \code{as.matrix} function for classification results. Returns matrix with performance values for specific class. } diff --git a/man/as.matrix.ldecomp.Rd b/man/as.matrix.ldecomp.Rd index 3b7feaa..1663d52 100755 --- a/man/as.matrix.ldecomp.Rd +++ b/man/as.matrix.ldecomp.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{as.matrix.ldecomp} \alias{as.matrix.ldecomp} @@ -12,7 +12,7 @@ \item{...}{other arguments} } \description{ -Generic \code{as.matrix} function for linear decomposition. Returns a matrix with information +Generic \code{as.matrix} function for linear decomposition. Returns a matrix with information about the decomposition. } diff --git a/man/as.matrix.plsdares.Rd b/man/as.matrix.plsdares.Rd index 0439450..bd8370c 100755 --- a/man/as.matrix.plsdares.Rd +++ b/man/as.matrix.plsdares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsdares.R \name{as.matrix.plsdares} \alias{as.matrix.plsdares} diff --git a/man/as.matrix.plsres.Rd b/man/as.matrix.plsres.Rd index 3c01958..ccf1d2c 100755 --- a/man/as.matrix.plsres.Rd +++ b/man/as.matrix.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{as.matrix.plsres} \alias{as.matrix.plsres} diff --git a/man/as.matrix.regcoeffs.Rd b/man/as.matrix.regcoeffs.Rd index 627585a..9ec58eb 100755 --- a/man/as.matrix.regcoeffs.Rd +++ b/man/as.matrix.regcoeffs.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regcoeffs.R \name{as.matrix.regcoeffs} \alias{as.matrix.regcoeffs} diff --git a/man/as.matrix.regres.Rd b/man/as.matrix.regres.Rd index b0ce197..7809b4b 100755 --- a/man/as.matrix.regres.Rd +++ b/man/as.matrix.regres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{as.matrix.regres} \alias{as.matrix.regres} diff --git a/man/bars.Rd b/man/bars.Rd index 74285d1..7764e4e 100755 --- a/man/bars.Rd +++ b/man/bars.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{bars} \alias{bars} diff --git a/man/classify.plsda.Rd b/man/classify.plsda.Rd index abe833e..de87788 100755 --- a/man/classify.plsda.Rd +++ b/man/classify.plsda.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsda.R \name{classify.plsda} \alias{classify.plsda} diff --git a/man/classres.Rd b/man/classres.Rd index 6e0c8b4..d916792 100644 --- a/man/classres.Rd +++ b/man/classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{classres} \alias{classres} @@ -30,10 +30,10 @@ The following fields are available only if reference values were provided. \code{classres} is used to store results classification for one or multiple classes. } \details{ -There is no need to create a \code{classres} object manually, it is created automatically when -build a classification model (e.g. using \code{\link{simca}} or \code{\link{plsda}}) or apply the -model to new data. For any classification method from \code{mdatools}, a class using to represent -results of classification (e.g. \code{\link{simcares}}) inherits fields and methods of +There is no need to create a \code{classres} object manually, it is created automatically when +build a classification model (e.g. using \code{\link{simca}} or \code{\link{plsda}}) or apply the +model to new data. For any classification method from \code{mdatools}, a class using to represent +results of classification (e.g. \code{\link{simcares}}) inherits fields and methods of \code{classres}. } \seealso{ diff --git a/man/crossval.Rd b/man/crossval.Rd index eb448a7..c3f3b62 100755 --- a/man/crossval.Rd +++ b/man/crossval.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/crossval.R \name{crossval} \alias{crossval} @@ -9,17 +9,17 @@ crossval(nobj, cv = NULL) \arguments{ \item{nobj}{number of objects in a dataset} -\item{cv}{cross-validation settings, can be a number or a list. If cv is a number, it will be -used as a number of segments for random cross-validation (if cv = 1, full cross-validation -will be preformed), if it is a list, the following syntax can be used: cv = list('rand', nseg, nrep) -for random repeated cross-validation with nseg segments and nrep repetitions or cv = list('ven', nseg) +\item{cv}{cross-validation settings, can be a number or a list. If cv is a number, it will be +used as a number of segments for random cross-validation (if cv = 1, full cross-validation +will be preformed), if it is a list, the following syntax can be used: cv = list('rand', nseg, nrep) +for random repeated cross-validation with nseg segments and nrep repetitions or cv = list('ven', nseg) for systematic splits to nseg segments ('venetian blinds').} } \value{ matrix with object indices for each segment } \description{ -Generates and returns sequence of object indices for each segment in random segmented +Generates and returns sequence of object indices for each segment in random segmented cross-validation } diff --git a/man/crossval.str.Rd b/man/crossval.str.Rd index dfdf703..94a1e18 100644 --- a/man/crossval.str.Rd +++ b/man/crossval.str.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/crossval.R \name{crossval.str} \alias{crossval.str} diff --git a/man/erfinv.Rd b/man/erfinv.Rd index 7016ea6..050b306 100755 --- a/man/erfinv.Rd +++ b/man/erfinv.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{erfinv} \alias{erfinv} diff --git a/man/errorbars.Rd b/man/errorbars.Rd index 907ef4c..4cc08f9 100755 --- a/man/errorbars.Rd +++ b/man/errorbars.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{errorbars} \alias{errorbars} diff --git a/man/getCalibrationData.Rd b/man/getCalibrationData.Rd index e837e2d..eb0f1af 100644 --- a/man/getCalibrationData.Rd +++ b/man/getCalibrationData.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{getCalibrationData} \alias{getCalibrationData} diff --git a/man/getCalibrationData.pca.Rd b/man/getCalibrationData.pca.Rd index b533418..66a4eb0 100755 --- a/man/getCalibrationData.pca.Rd +++ b/man/getCalibrationData.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{getCalibrationData.pca} \alias{getCalibrationData.pca} diff --git a/man/getCalibrationData.simcam.Rd b/man/getCalibrationData.simcam.Rd index 65f49e1..4cfba5d 100755 --- a/man/getCalibrationData.simcam.Rd +++ b/man/getCalibrationData.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{getCalibrationData.simcam} \alias{getCalibrationData.simcam} diff --git a/man/getClassificationPerformance.Rd b/man/getClassificationPerformance.Rd index 82e6ed2..9b3e0fa 100755 --- a/man/getClassificationPerformance.Rd +++ b/man/getClassificationPerformance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{getClassificationPerformance} \alias{getClassificationPerformance} @@ -27,7 +27,7 @@ Calculates and returns performance parameters for classification result (e.g. nu negatives, false positives, sensitivity, specificity, etc.). } \details{ -The function is called automatically when a classification result with reference values is +The function is called automatically when a classification result with reference values is created, for example when applying a \code{plsda} or \code{simca} models. } diff --git a/man/getMainTitle.Rd b/man/getMainTitle.Rd index ed07016..e36e9bf 100755 --- a/man/getMainTitle.Rd +++ b/man/getMainTitle.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{getMainTitle} \alias{getMainTitle} diff --git a/man/getRegcoeffs.Rd b/man/getRegcoeffs.Rd index 49a2d9a..733084c 100644 --- a/man/getRegcoeffs.Rd +++ b/man/getRegcoeffs.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{getRegcoeffs} \alias{getRegcoeffs} diff --git a/man/getRegcoeffs.pls.Rd b/man/getRegcoeffs.pls.Rd index a516973..4a74509 100644 --- a/man/getRegcoeffs.pls.Rd +++ b/man/getRegcoeffs.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{getRegcoeffs.pls} \alias{getRegcoeffs.pls} @@ -22,7 +22,7 @@ the PLS model which can be applied to a data directly } \details{ The method recalculates the regression coefficients found by the PLS algorithm -taking into account centering and scaling of predictors and responses, so the +taking into account centering and scaling of predictors and responses, so the matrix with coefficients can be applied directly to original data (yp = Xb). If number of components is not specified, the optimal number, selected by user diff --git a/man/getSelectedComponents.Rd b/man/getSelectedComponents.Rd index ba72547..a0eeb4e 100755 --- a/man/getSelectedComponents.Rd +++ b/man/getSelectedComponents.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/misc.R \name{getSelectedComponents} \alias{getSelectedComponents} @@ -15,7 +15,7 @@ getSelectedComponents(obj, ncomp = NULL) returns number of components depending on a user choice } \details{ -Depedning on a user choice it returns optimal number of component for the model (if +Depedning on a user choice it returns optimal number of component for the model (if use did not provide any value) or check the user choice for correctness and returns it back } diff --git a/man/getSelectedComponents.classres.Rd b/man/getSelectedComponents.classres.Rd index 2de957e..e10d6f1 100755 --- a/man/getSelectedComponents.classres.Rd +++ b/man/getSelectedComponents.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{getSelectedComponents.classres} \alias{getSelectedComponents.classres} @@ -15,7 +15,7 @@ getSelectedComponents.classres(obj, ncomp = NULL) Returns number of components depending on user selection and object properites } \details{ -This is a technical function used for selection proper value for number of components in +This is a technical function used for selection proper value for number of components in plotting functions. } diff --git a/man/getSelectivityRatio.Rd b/man/getSelectivityRatio.Rd index e9af4f2..f23a050 100644 --- a/man/getSelectivityRatio.Rd +++ b/man/getSelectivityRatio.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{getSelectivityRatio} \alias{getSelectivityRatio} diff --git a/man/getSelectivityRatio.pls.Rd b/man/getSelectivityRatio.pls.Rd index bcbfe0c..178c2e7 100755 --- a/man/getSelectivityRatio.pls.Rd +++ b/man/getSelectivityRatio.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{getSelectivityRatio.pls} \alias{getSelectivityRatio.pls} @@ -9,7 +9,7 @@ \arguments{ \item{obj}{a PLS model (object of class \code{pls})} -\item{ncomp}{number of components to get the values for (if NULL user selected as optimal will be +\item{ncomp}{number of components to get the values for (if NULL user selected as optimal will be used)} \item{ny}{which response to get the values for (if y is multivariate)} diff --git a/man/getVIPScores.Rd b/man/getVIPScores.Rd index b8f777b..fa0e7fc 100644 --- a/man/getVIPScores.Rd +++ b/man/getVIPScores.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{getVIPScores} \alias{getVIPScores} diff --git a/man/getVIPScores.pls.Rd b/man/getVIPScores.pls.Rd index 91bd427..da318e2 100755 --- a/man/getVIPScores.pls.Rd +++ b/man/getVIPScores.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{getVIPScores.pls} \alias{getVIPScores.pls} diff --git a/man/ipls.Rd b/man/ipls.Rd index 9c68457..7661ffb 100644 --- a/man/ipls.Rd +++ b/man/ipls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipls.R \name{ipls} \alias{ipls} @@ -55,46 +55,47 @@ Applies iPLS alrogithm to find variable intervals most important for prediction } \details{ -The algorithm splits the predictors into several intervals and tries to find a combination +The algorithm splits the predictors into several intervals and tries to find a combination of the intervals, which gives best prediction performance. There are two selection methods: "forward" when the intervals are successively included, and "backward" when the intervals are successively excluded from a model. On the first step the algorithm finds the best -(forward) or the worst (backward) individual interval. Then it tests the others to find the -one which gives the best model in a combination with the already selected/excluded one. The -procedure continues until the maximum number of iteration is reached. - -There are several ways to specify the intervals. First of all either number of intervals +(forward) or the worst (backward) individual interval. Then it tests the others to find the +one which gives the best model in a combination with the already selected/excluded one. The +procedure continues until the maximum number of iteration is reached. + +There are several ways to specify the intervals. First of all either number of intervals (\code{int.num}) or width of the intervals (\code{int.width}) can be provided. Alternatively -one can specify the limits (first and last variable number) of the intervals manually +one can specify the limits (first and last variable number) of the intervals manually with \code{int.limits}. } \examples{ library(mdatools) ## forward selection for simdata - + data(simdata) Xc = simdata$spectra.c yc = simdata$conc.c[, 3, drop = FALSE] -# run iPLS and show results +# run iPLS and show results im = ipls(Xc, yc, int.ncomp = 5, int.num = 10, cv = 4, method = "forward") summary(im) plot(im) - + # show "developing" of RMSECV during the algorithm execution plotRMSE(im) - + # plot predictions before and after selection par(mfrow = c(1, 2)) plotPredictions(im$gm) plotPredictions(im$om) - + # show selected intervals on spectral plot ind = im$var.selected mspectrum = apply(Xc, 2, mean) plot(simdata$wavelength, mspectrum, type = 'l', col = 'lightblue') points(simdata$wavelength[ind], mspectrum[ind], pch = 16, col = 'blue') + } \references{ [1] Lars Noergaard at al. Interval partial least-squares regression (iPLS): a diff --git a/man/ipls.backward.Rd b/man/ipls.backward.Rd index 002d4f6..7e5f28f 100644 --- a/man/ipls.backward.Rd +++ b/man/ipls.backward.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipls.R \name{ipls.backward} \alias{ipls.backward} diff --git a/man/ipls.forward.Rd b/man/ipls.forward.Rd index 5703abf..1d6a307 100644 --- a/man/ipls.forward.Rd +++ b/man/ipls.forward.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipls.R \name{ipls.forward} \alias{ipls.forward} diff --git a/man/ldecomp.Rd b/man/ldecomp.Rd index 32c973f..ce7664e 100755 --- a/man/ldecomp.Rd +++ b/man/ldecomp.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{ldecomp} \alias{ldecomp} @@ -43,13 +43,13 @@ Returns an object (list) of \code{ldecomp} class with following fields: Creates an object of ldecomp class. } \details{ -\code{ldecomp} is a general class for decomposition X = TP' + E. Here, X is a data matrix, -T - matrix with scores, P - matrix with loadings and E - matrix with residuals. It is used, -for example, for PCA results (\code{\link{pcares}}), in PLS and other methods. The class also +\code{ldecomp} is a general class for decomposition X = TP' + E. Here, X is a data matrix, +T - matrix with scores, P - matrix with loadings and E - matrix with residuals. It is used, +for example, for PCA results (\code{\link{pcares}}), in PLS and other methods. The class also includes methods for calculation and plotting residuals, variances, and so on. -There is no need to use the \code{ldecomp} manually. For example, when build PCA model -with \code{\link{pca}} or apply it to a new data, the results will automatically inherit +There is no need to use the \code{ldecomp} manually. For example, when build PCA model +with \code{\link{pca}} or apply it to a new data, the results will automatically inherit all methods of \code{ldecomp}. } diff --git a/man/ldecomp.getDistances.Rd b/man/ldecomp.getDistances.Rd index 812844d..a384011 100755 --- a/man/ldecomp.getDistances.Rd +++ b/man/ldecomp.getDistances.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{ldecomp.getDistances} \alias{ldecomp.getDistances} @@ -13,7 +13,7 @@ ldecomp.getDistances(scores, loadings, residuals, tnorm = NULL, cal = TRUE) \item{residuals}{matrix with residuals (E).} -\item{tnorm}{vector with singular values for scores normalisation (if NULL will be calculated from +\item{tnorm}{vector with singular values for scores normalisation (if NULL will be calculated from \code{scores}).} \item{cal}{logical, are these results for calibration set or not} @@ -25,7 +25,7 @@ Returns a list with Q, Qvar, T2 and modelling power values for each component. Computes residual distances (Q and T2) and modelling power for a data decomposition X = TP' + E. } \details{ -The distances are calculated for every 1:n components, where n goes from 1 to ncomp +The distances are calculated for every 1:n components, where n goes from 1 to ncomp (number of columns in scores and loadings). } diff --git a/man/ldecomp.getResLimits.Rd b/man/ldecomp.getResLimits.Rd index ad06265..4d68186 100755 --- a/man/ldecomp.getResLimits.Rd +++ b/man/ldecomp.getResLimits.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{ldecomp.getResLimits} \alias{ldecomp.getResLimits} diff --git a/man/ldecomp.getVariances.Rd b/man/ldecomp.getVariances.Rd index 016f904..2ebc339 100755 --- a/man/ldecomp.getVariances.Rd +++ b/man/ldecomp.getVariances.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{ldecomp.getVariances} \alias{ldecomp.getVariances} diff --git a/man/mdaplot.Rd b/man/mdaplot.Rd index b0dfd56..4921fc6 100644 --- a/man/mdaplot.Rd +++ b/man/mdaplot.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot} \alias{mdaplot} @@ -73,40 +73,40 @@ mdaplot(data, type = "p", pch = 16, col = NULL, lty = 1, lwd = 1, \code{mdaplot} is used to make a scatter, line or a bar plot for one set of data objects. } \details{ -Most of the parameters are similar to what are used with standard \code{plot} function. The +Most of the parameters are similar to what are used with standard \code{plot} function. The differences are described below. - -The function makes a plot of one set of objects. It can be a set of points (scatter plot), -bars, lines or scatter-lines. The data is organized as a matrix. For scatter and bar plot only + +The function makes a plot of one set of objects. It can be a set of points (scatter plot), +bars, lines or scatter-lines. The data is organized as a matrix. For scatter and bar plot only two columns are needed, but to plot set of lines there are two ways to organise the data matrix. -If parameter \code{single.x = T} it means first column of the matrix contains x values, as the +If parameter \code{single.x = T} it means first column of the matrix contains x values, as the other columns contain y values (one column - one line, e.g. [x y1 y2 y3]). If \code{single.x = F} it means every odd column of matrix contains x values and every even column - y values of a line (e.g. [x1 y1 x2 y2 x3 y3]). This option is needed if lines have different x values. -The function allows to colorize lines and points according to values of a parameter +The function allows to colorize lines and points according to values of a parameter \code{cgroup}. The parameter must be a vector with the same elements as number of objects (rows) -in the data. The values are divided into up to eight intervals and for each interval a -particular color from a selected color scheme is assigned. Parameter \code{show.colorbar} +in the data. The values are divided into up to eight intervals and for each interval a +particular color from a selected color scheme is assigned. Parameter \code{show.colorbar} allows to turn off and on a color bar legend for this option. The used color scheme is defined by the \code{colmap} parameter. The default scheme is based -on color brewer (colorbrewer2.org) diverging scheme with eight colors. There is also a gray -scheme (\code{colmap = 'gray'}) and user can define its own just by specifing the needed -sequence of colors (e.g. \code{colmap = c('red', 'yellow', 'green')}, two colors is minimum). -The scheme will then be generated automatically as a gradient among the colors. +on color brewer (colorbrewer2.org) diverging scheme with eight colors. There is also a gray +scheme (\code{colmap = 'gray'}) and user can define its own just by specifing the needed +sequence of colors (e.g. \code{colmap = c('red', 'yellow', 'green')}, two colors is minimum). +The scheme will then be generated automatically as a gradient among the colors. -Besides that the function allows to change tick values and corresponding tick labels for x and +Besides that the function allows to change tick values and corresponding tick labels for x and y axis, see examples for more details. } \examples{ library(mdatools) ### Examples of using mdaplot function - + ## 1. Make a line plot for y = x^2 with different x values for each line -x1 = seq(-10, 10, length = 100) +x1 = seq(-10, 10, length = 100) y1 = x1^2 x2 = seq(-9, 9, length = 100) + 1 y2 = x2^2 * 1.2 @@ -130,7 +130,7 @@ data(simdata) val = cbind(simdata$wavelength, t(simdata$spectra.c)) # concentration will be used for color groups -c1 = simdata$conc.c[, 1] +c1 = simdata$conc.c[, 1] par(mfrow = c(2, 2)) mdaplot(val, type = 'l', cgroup = c1) @@ -147,7 +147,7 @@ nobj = 30 c1 = simdata$conc.c[1:nobj, 1] # x values are absorbance of waveband 100, y values - absorbance for waveband 110 pdata = cbind( - simdata$spectra.c[1:nobj, 100, drop = FALSE], + simdata$spectra.c[1:nobj, 100, drop = FALSE], simdata$spectra.c[1:nobj, 110, drop = FALSE]) par(mfrow = c(2, 2)) @@ -156,6 +156,7 @@ mdaplot(pdata, cgroup = c1, main = 'Spectra', show.lines = c(0.06, 0.01)) mdaplot(pdata, cgroup = c1, xlab = '309 nm', ylab = '319 nm', main = 'Spectra', show.labels = TRUE) mdaplot(pdata, col = 'red', pch = 17, show.labels = TRUE, labels = paste('Obj', 1:nobj)) par(mfrow = c(1, 1)) + } \author{ Sergey Kucheryavskiy (svkucheryavski@gmail.com) diff --git a/man/mdaplot.areColors.Rd b/man/mdaplot.areColors.Rd index ca77dce..965d1bf 100755 --- a/man/mdaplot.areColors.Rd +++ b/man/mdaplot.areColors.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.areColors} \alias{mdaplot.areColors} diff --git a/man/mdaplot.formatValues.Rd b/man/mdaplot.formatValues.Rd index 7109eaa..aeab086 100755 --- a/man/mdaplot.formatValues.Rd +++ b/man/mdaplot.formatValues.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.formatValues} \alias{mdaplot.formatValues} diff --git a/man/mdaplot.getAxesLim.Rd b/man/mdaplot.getAxesLim.Rd index cdb31d7..6253db4 100755 --- a/man/mdaplot.getAxesLim.Rd +++ b/man/mdaplot.getAxesLim.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.getAxesLim} \alias{mdaplot.getAxesLim} @@ -33,7 +33,7 @@ mdaplot.getAxesLim(data, single.x = T, show.colorbar = F, show.lines = F, Returns a list with four limits for the x and y axes. } \description{ -Calculates axes limits depending on data values that have to be plotted, +Calculates axes limits depending on data values that have to be plotted, extra plot elements that have to be shown and margins. } \details{ diff --git a/man/mdaplot.getColors.Rd b/man/mdaplot.getColors.Rd index 9ec1000..082066d 100755 --- a/man/mdaplot.getColors.Rd +++ b/man/mdaplot.getColors.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.getColors} \alias{mdaplot.getColors} diff --git a/man/mdaplot.plotAxes.Rd b/man/mdaplot.plotAxes.Rd index 09c4634..33cf753 100755 --- a/man/mdaplot.plotAxes.Rd +++ b/man/mdaplot.plotAxes.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.plotAxes} \alias{mdaplot.plotAxes} diff --git a/man/mdaplot.showColorbar.Rd b/man/mdaplot.showColorbar.Rd index eba724d..291e0e8 100755 --- a/man/mdaplot.showColorbar.Rd +++ b/man/mdaplot.showColorbar.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.showColorbar} \alias{mdaplot.showColorbar} diff --git a/man/mdaplot.showGrid.Rd b/man/mdaplot.showGrid.Rd index c0f99bc..779e161 100755 --- a/man/mdaplot.showGrid.Rd +++ b/man/mdaplot.showGrid.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.showGrid} \alias{mdaplot.showGrid} diff --git a/man/mdaplot.showLabels.Rd b/man/mdaplot.showLabels.Rd index 5c38cc8..d893e16 100755 --- a/man/mdaplot.showLabels.Rd +++ b/man/mdaplot.showLabels.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.showLabels} \alias{mdaplot.showLabels} diff --git a/man/mdaplot.showLegend.Rd b/man/mdaplot.showLegend.Rd index 0b6e104..fa4bf00 100755 --- a/man/mdaplot.showLegend.Rd +++ b/man/mdaplot.showLegend.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.showLegend} \alias{mdaplot.showLegend} diff --git a/man/mdaplot.showLines.Rd b/man/mdaplot.showLines.Rd index 52e316c..20f3410 100755 --- a/man/mdaplot.showLines.Rd +++ b/man/mdaplot.showLines.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.showLines} \alias{mdaplot.showLines} diff --git a/man/mdaplot.showRegressionLine.Rd b/man/mdaplot.showRegressionLine.Rd index 8ce0ae0..b0b17c3 100755 --- a/man/mdaplot.showRegressionLine.Rd +++ b/man/mdaplot.showRegressionLine.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplot.showRegressionLine} \alias{mdaplot.showRegressionLine} diff --git a/man/mdaplotg.Rd b/man/mdaplotg.Rd index 421357d..65fd596 100644 --- a/man/mdaplotg.Rd +++ b/man/mdaplotg.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mdaplots.R \name{mdaplotg} \alias{mdaplotg} @@ -68,13 +68,13 @@ mdaplotg(data, type = "p", pch = 16, lty = 1, lwd = 1, bwd = 0.8, \item{...}{other plotting arguments.} } \description{ -\code{mdaplotg} is used to make scatter, line or bar plots or their combination for several sets +\code{mdaplotg} is used to make scatter, line or bar plots or their combination for several sets of objects. } \details{ -The \code{mdaplotg} function is used to make a plot with several sets of objects. Simply -speaking, use it when you need a plot with legend. For example to show line plot with spectra -from calibration and test set, scatter plot for height and weight values for women and men, and +The \code{mdaplotg} function is used to make a plot with several sets of objects. Simply +speaking, use it when you need a plot with legend. For example to show line plot with spectra +from calibration and test set, scatter plot for height and weight values for women and men, and so on. Most of the parameters are similar to \code{\link{mdaplot}}, the difference is described below. @@ -82,14 +82,14 @@ Most of the parameters are similar to \code{\link{mdaplot}}, the difference is d The data should be organized as a list, every item is a matrix with data for one set of objects. See examples for details. -There is no color grouping option, because color is used to separate the sets. Marker symbol, -line style and type, etc. can be defined as a single value (one for all sets) and as a vector +There is no color grouping option, because color is used to separate the sets. Marker symbol, +line style and type, etc. can be defined as a single value (one for all sets) and as a vector with one value for each set. } \examples{ ### Examples of using mdaplotg -## 1. Show scatter plot for with height and weight values +## 1. Show scatter plot for with height and weight values ## for males and females data(people) @@ -108,7 +108,7 @@ mdaplotg(pdata, legend = c('female', 'male'), legend.position = 'topleft', show. par(mfrow = c(1, 1)) ## 2. Change tick values for x axis -mdaplotg(pdata, legend = c('female', 'male'), xticks = c(160, 175, 190), +mdaplotg(pdata, legend = c('female', 'male'), xticks = c(160, 175, 190), xticklabels = c('Short', 'Medium', 'Tall')) ## 3. Show line plots with spectra from calibration and test set of the Simdata @@ -125,6 +125,7 @@ mdaplotg(pdata, type = 'l', legend = c('cal', 'test'), xlab = 'Wavelength, nm', mdaplotg(pdata, type = 'l', legend = c('cal', 'test'), lty = c(3, 2)) mdaplotg(pdata, type = 'l', legend = c('cal', 'test'), lwd = 2, colmap = c('green', 'orange')) par(mfrow = c(1, 1)) + } \author{ Sergey Kucheryavskiy (svkucheryavski@gmail.com) diff --git a/man/pca.Rd b/man/pca.Rd index 97a7be9..6f5d285 100644 --- a/man/pca.Rd +++ b/man/pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{pca} \alias{pca} @@ -22,41 +22,39 @@ pca(x, ncomp = 15, center = T, scale = F, cv = NULL, x.test = NULL, \item{alpha}{significance level for calculating limit for Q residuals.} -\item{method}{method to compute principal components.} +\item{method}{method to compute principal components ('svd', 'nipals').} \item{info}{a short text line with model description.} } \value{ Returns an object of \code{pca} class with following fields: -\item{ncomp }{number of components included to the model.} -\item{ncomp.selected }{selected (optimal) number of components.} -\item{loadings }{matrix with loading values (nvar x ncomp).} -\item{eigenvals }{vector with eigenvalues for all existent components.} -\item{expvar }{vector with explained variance for each component (in percent).} -\item{cumexpvar }{vector with cumulative explained variance for each component (in percent).} -\item{T2lim }{statistical limit for T2 distance.} -\item{Qlim }{statistical limit for Q residuals.} -\item{info }{information about the model, provided by user when build the model.} -\item{calres }{an object of class \code{\link{pcares}} with PCA results for a calibration data.} -\item{testres }{an object of class \code{\link{pcares}} with PCA results for a test data, if it -was provided.} -\item{cvres }{an object of class \code{\link{pcares}} with PCA results for cross-validation, +\item{ncomp }{number of components included to the model.} +\item{ncomp.selected }{selected (optimal) number of components.} +\item{loadings }{matrix with loading values (nvar x ncomp).} +\item{eigenvals }{vector with eigenvalues for all existent components.} +\item{expvar }{vector with explained variance for each component (in percent).} +\item{cumexpvar }{vector with cumulative explained variance for each component (in percent).} +\item{T2lim }{statistical limit for T2 distance.} +\item{Qlim }{statistical limit for Q residuals.} +\item{info }{information about the model, provided by user when build the model.} +\item{calres }{an object of class \code{\link{pcares}} with PCA results for a calibration data.} +\item{testres }{an object of class \code{\link{pcares}} with PCA results for a test data, if it +was provided.} +\item{cvres }{an object of class \code{\link{pcares}} with PCA results for cross-validation, if this option was chosen.} } \description{ \code{pca} is used to build and explore a principal component analysis (PCA) model. } \details{ -So far only SVD (Singular Value Decompisition) method is available, more coming soon. - -By default \code{pca} uses number of components (\code{ncomp}) as a minimum of number of -objects - 1, number of variables and default or provided value. Besides that, there is also -a parameter for selecting an optimal number of components (\code{ncomp.selected}). The optimal -number of components is used to build a residuals plot (with Q residuals vs. Hotelling T2 -values), calculate confidence limits for Q residuals, as well as for SIMCA classification. - -If data contains missing values (NA) the \code{pca} will use an iterative algorithm to fit the -values with most probable ones. The algorithm is implemented in a function +By default \code{pca} uses number of components (\code{ncomp}) as a minimum of number of +objects - 1, number of variables and default or provided value. Besides that, there is also +a parameter for selecting an optimal number of components (\code{ncomp.selected}). The optimal +number of components is used to build a residuals plot (with Q residuals vs. Hotelling T2 +values), calculate confidence limits for Q residuals, as well as for SIMCA classification. + +If data contains missing values (NA) the \code{pca} will use an iterative algorithm to fit the +values with most probable ones. The algorithm is implemented in a function \code{\link{pca.mvreplace}}. The same center and scale options will be used. You can also do this step manually before calling \code{pca} and play with extra options. } @@ -100,6 +98,7 @@ plotCumVariance(model, show.labels = TRUE, legend.position = 'bottomright') plotResiduals(model, show.labels = TRUE) plotResiduals(model, ncomp = 2, show.labels = TRUE) par(mfrow = c(1, 1)) + } \author{ Sergey Kucheryavskiy (svkucheryavski@gmail.com) @@ -118,7 +117,7 @@ Methods for \code{pca} objects: \code{\link{plotResiduals.pca}} \tab shows Q vs. T2 residuals plot.\cr } Most of the methods for plotting data are also available for PCA results (\code{\link{pcares}}) - objects. Also check \code{\link{pca.mvreplace}}, which replaces missing values in a data matrix + objects. Also check \code{\link{pca.mvreplace}}, which replaces missing values in a data matrix with approximated using iterative PCA decomposition. } diff --git a/man/pca.cal.Rd b/man/pca.cal.Rd index 1b15172..f6e22af 100755 --- a/man/pca.cal.Rd +++ b/man/pca.cal.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{pca.cal} \alias{pca.cal} @@ -15,7 +15,7 @@ pca.cal(x, ncomp, center = T, scale = F, method = "svd") \item{scale}{logical, do standardization or not} -\item{method}{algorithm for compiting PC space (only 'svd' is supported so far)} +\item{method}{algorithm for compiting PC space (only 'svd' and 'nipals' are supported so far)} } \value{ an object with calibrated PCA model diff --git a/man/pca.crossval.Rd b/man/pca.crossval.Rd index 0fa76b1..1b66827 100755 --- a/man/pca.crossval.Rd +++ b/man/pca.crossval.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{pca.crossval} \alias{pca.crossval} diff --git a/man/pca.mvreplace.Rd b/man/pca.mvreplace.Rd index 600a3b5..0795931 100644 --- a/man/pca.mvreplace.Rd +++ b/man/pca.mvreplace.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{pca.mvreplace} \alias{pca.mvreplace} @@ -16,7 +16,7 @@ pca.mvreplace(x, center = T, scale = F, maxncomp = 7, expvarlim = 0.95, \item{maxncomp}{maximum number of components in PCA model.} -\item{expvarlim}{minimum amount of variance, explained by chosen components (used for selection of optimal number +\item{expvarlim}{minimum amount of variance, explained by chosen components (used for selection of optimal number of components in PCA models).} \item{covlim}{convergence criterion.} @@ -27,11 +27,11 @@ of components in PCA models).} Returns the same matrix \code{x} where missing values are replaced with approximated. } \description{ -\code{pca.mvreplace} is used to replace missing values in a data matrix with +\code{pca.mvreplace} is used to replace missing values in a data matrix with approximated by iterative PCA decomposition. } \details{ -The function uses iterative PCA modeling of the data to approximate and impute missing values. +The function uses iterative PCA modeling of the data to approximate and impute missing values. The result is most optimal for data sets with low or moderate level of noise and with number of missing values less than 10\% for small dataset and up to 20\% for large data. } @@ -53,13 +53,14 @@ rdata = pca.mvreplace(mdata, scale = TRUE) # show all matrices together show(cbind(odata, mdata, round(rdata, 2))) + } \author{ Sergey Kucheryavskiy (svkucheryavski@gmail.com) } \references{ -Philip R.C. Nelson, Paul A. Taylor, John F. MacGregor. Missing data methods in PCA and PLS: -Score calculations with incomplete observations. Chemometrics and Intelligent Laboratory +Philip R.C. Nelson, Paul A. Taylor, John F. MacGregor. Missing data methods in PCA and PLS: +Score calculations with incomplete observations. Chemometrics and Intelligent Laboratory Systems, 35 (1), 1996. } diff --git a/man/pca.nipals.Rd b/man/pca.nipals.Rd index 72c9a16..e76729d 100755 --- a/man/pca.nipals.Rd +++ b/man/pca.nipals.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{pca.nipals} \alias{pca.nipals} @@ -15,11 +15,11 @@ pca.nipals(x, ncomp) a list with scores, loadings and eigencalues for the components } \description{ -Calculates principal component space using non-linear iterative partial least squares algorithm +Calculates principal component space using non-linear iterative partial least squares algorithm (NIPALS) } \references{ -Geladi, Paul; Kowalski, Bruce (1986), "Partial Least Squares +Geladi, Paul; Kowalski, Bruce (1986), "Partial Least Squares Regression:A Tutorial", Analytica Chimica Acta 185: 1-17 } diff --git a/man/pca.svd.Rd b/man/pca.svd.Rd index 378e47c..694ad59 100755 --- a/man/pca.svd.Rd +++ b/man/pca.svd.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{pca.svd} \alias{pca.svd} diff --git a/man/pcares.Rd b/man/pcares.Rd index 6d8f621..af9db57 100644 --- a/man/pcares.Rd +++ b/man/pcares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pcares.R \name{pcares} \alias{pcares} @@ -38,11 +38,11 @@ Returns an object (list) of class \code{pcares} and \code{ldecomp} with followin } \details{ In fact \code{pcares} is a wrapper for \code{\link{ldecomp}} - general class for storing -results for linear decomposition X = TP' + E. So, most of the methods, arguments and +results for linear decomposition X = TP' + E. So, most of the methods, arguments and returned values are inherited from \code{ldecomp}. - -There is no need to create a \code{pcares} object manually, it is created automatically when -build a PCA model (see \code{\link{pca}}) or apply the model to a new data (see + +There is no need to create a \code{pcares} object manually, it is created automatically when +build a PCA model (see \code{\link{pca}}) or apply the model to a new data (see \code{\link{predict.pca}}). The object can be used to show summary and plots for the results. } \examples{ @@ -91,6 +91,7 @@ plotCumVariance(res, show.labels = TRUE, legend.position = 'bottomright') plotResiduals(res, show.labels = TRUE, cgroup = people[, 'Sex']) plotResiduals(res, ncomp = 2, show.labels = TRUE) par(mfrow = c(1, 1)) + } \seealso{ Methods for \code{pcares} objects: @@ -99,7 +100,7 @@ Methods for \code{pcares} objects: \code{summary.pcares} \tab shows statistics for the PCA results.\cr } -Methods, inherited from \code{\link{ldecomp}} class: +Methods, inherited from \code{\link{ldecomp}} class: \tabular{ll}{ \code{\link{plotScores.ldecomp}} \tab makes scores plot.\cr \code{\link{plotVariance.ldecomp}} \tab makes explained variance plot.\cr diff --git a/man/pinv.Rd b/man/pinv.Rd index 10e4a12..5fe27ad 100755 --- a/man/pinv.Rd +++ b/man/pinv.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prep.R \name{pinv} \alias{pinv} diff --git a/man/plot.classres.Rd b/man/plot.classres.Rd index 0e9c279..4eeae99 100755 --- a/man/plot.classres.Rd +++ b/man/plot.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{plot.classres} \alias{plot.classres} diff --git a/man/plot.ipls.Rd b/man/plot.ipls.Rd index d4fe42b..46e1ccc 100644 --- a/man/plot.ipls.Rd +++ b/man/plot.ipls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipls.R \name{plot.ipls} \alias{plot.ipls} diff --git a/man/plot.pca.Rd b/man/plot.pca.Rd index 93de5d7..71f7590 100755 --- a/man/plot.pca.Rd +++ b/man/plot.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{plot.pca} \alias{plot.pca} diff --git a/man/plot.pcares.Rd b/man/plot.pcares.Rd index 8d4b616..b8a8c73 100755 --- a/man/plot.pcares.Rd +++ b/man/plot.pcares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pcares.R \name{plot.pcares} \alias{plot.pcares} diff --git a/man/plot.pls.Rd b/man/plot.pls.Rd index b7a32d8..bdb34ba 100755 --- a/man/plot.pls.Rd +++ b/man/plot.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plot.pls} \alias{plot.pls} diff --git a/man/plot.plsda.Rd b/man/plot.plsda.Rd index 8214aa9..73b3b29 100755 --- a/man/plot.plsda.Rd +++ b/man/plot.plsda.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsda.R \name{plot.plsda} \alias{plot.plsda} @@ -21,7 +21,7 @@ \item{...}{other arguments} } \description{ -Shows a set of plots (x residuals, regression coefficients, misclassification ratio and +Shows a set of plots (x residuals, regression coefficients, misclassification ratio and predictions) for PLS-DA model. } \details{ diff --git a/man/plot.plsdares.Rd b/man/plot.plsdares.Rd index f5360c1..858e10e 100755 --- a/man/plot.plsdares.Rd +++ b/man/plot.plsdares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsdares.R \name{plot.plsdares} \alias{plot.plsdares} @@ -21,7 +21,7 @@ \item{...}{other arguments} } \description{ -Shows a set of plots (x residuals, y variance, classification performance and predictions) +Shows a set of plots (x residuals, y variance, classification performance and predictions) for PLS-DA results. } \details{ diff --git a/man/plot.plsres.Rd b/man/plot.plsres.Rd index 0f61769..d811700 100755 --- a/man/plot.plsres.Rd +++ b/man/plot.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plot.plsres} \alias{plot.plsres} diff --git a/man/plot.randtest.Rd b/man/plot.randtest.Rd index 36e3cc7..242362d 100644 --- a/man/plot.randtest.Rd +++ b/man/plot.randtest.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/randtest.R \name{plot.randtest} \alias{plot.randtest} diff --git a/man/plot.regcoeffs.Rd b/man/plot.regcoeffs.Rd index 67e74f3..05225f3 100755 --- a/man/plot.regcoeffs.Rd +++ b/man/plot.regcoeffs.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regcoeffs.R \name{plot.regcoeffs} \alias{plot.regcoeffs} diff --git a/man/plot.regres.Rd b/man/plot.regres.Rd index fd9046d..87b4855 100755 --- a/man/plot.regres.Rd +++ b/man/plot.regres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{plot.regres} \alias{plot.regres} diff --git a/man/plot.simca.Rd b/man/plot.simca.Rd index 5d049e2..5ef62ab 100755 --- a/man/plot.simca.Rd +++ b/man/plot.simca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simca.R \name{plot.simca} \alias{plot.simca} diff --git a/man/plot.simcam.Rd b/man/plot.simcam.Rd index da20594..4325d69 100755 --- a/man/plot.simcam.Rd +++ b/man/plot.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{plot.simcam} \alias{plot.simcam} diff --git a/man/plot.simcamres.Rd b/man/plot.simcamres.Rd index 89ecf09..3017a57 100755 --- a/man/plot.simcamres.Rd +++ b/man/plot.simcamres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcamres.R \name{plot.simcamres} \alias{plot.simcamres} diff --git a/man/plotCooman.Rd b/man/plotCooman.Rd index d8023b7..54223f2 100644 --- a/man/plotCooman.Rd +++ b/man/plotCooman.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotCooman} \alias{plotCooman} diff --git a/man/plotCooman.simcam.Rd b/man/plotCooman.simcam.Rd index 865b4a8..8c22fb4 100755 --- a/man/plotCooman.simcam.Rd +++ b/man/plotCooman.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{plotCooman.simcam} \alias{plotCooman.simcam} diff --git a/man/plotCooman.simcamres.Rd b/man/plotCooman.simcamres.Rd index 5336686..5056fc4 100755 --- a/man/plotCooman.simcamres.Rd +++ b/man/plotCooman.simcamres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcamres.R \name{plotCooman.simcamres} \alias{plotCooman.simcamres} diff --git a/man/plotCorr.Rd b/man/plotCorr.Rd index 86382ff..970abc2 100644 --- a/man/plotCorr.Rd +++ b/man/plotCorr.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotCorr} \alias{plotCorr} diff --git a/man/plotCorr.randtest.Rd b/man/plotCorr.randtest.Rd index d715fa1..c285b3d 100644 --- a/man/plotCorr.randtest.Rd +++ b/man/plotCorr.randtest.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/randtest.R \name{plotCorr.randtest} \alias{plotCorr.randtest} @@ -21,7 +21,7 @@ \item{...}{other optional arguments} } \description{ -Makes a plot with statistic values vs. coefficient of determination between permuted +Makes a plot with statistic values vs. coefficient of determination between permuted and reference y-values. } \details{ diff --git a/man/plotCumVariance.Rd b/man/plotCumVariance.Rd index 527f3cb..643e80e 100644 --- a/man/plotCumVariance.Rd +++ b/man/plotCumVariance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotCumVariance} \alias{plotCumVariance} diff --git a/man/plotCumVariance.ldecomp.Rd b/man/plotCumVariance.ldecomp.Rd index 6a41902..7753fae 100755 --- a/man/plotCumVariance.ldecomp.Rd +++ b/man/plotCumVariance.ldecomp.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{plotCumVariance.ldecomp} \alias{plotCumVariance.ldecomp} diff --git a/man/plotCumVariance.pca.Rd b/man/plotCumVariance.pca.Rd index 4880900..a12f1e0 100755 --- a/man/plotCumVariance.pca.Rd +++ b/man/plotCumVariance.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{plotCumVariance.pca} \alias{plotCumVariance.pca} diff --git a/man/plotDiscriminationPower.Rd b/man/plotDiscriminationPower.Rd index 6989fcd..bd68e84 100644 --- a/man/plotDiscriminationPower.Rd +++ b/man/plotDiscriminationPower.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotDiscriminationPower} \alias{plotDiscriminationPower} diff --git a/man/plotDiscriminationPower.simcam.Rd b/man/plotDiscriminationPower.simcam.Rd index 9fa6e7e..dde8145 100755 --- a/man/plotDiscriminationPower.simcam.Rd +++ b/man/plotDiscriminationPower.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{plotDiscriminationPower.simcam} \alias{plotDiscriminationPower.simcam} diff --git a/man/plotHist.Rd b/man/plotHist.Rd index c2d2b0c..ac9aac3 100644 --- a/man/plotHist.Rd +++ b/man/plotHist.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotHist} \alias{plotHist} diff --git a/man/plotHist.randtest.Rd b/man/plotHist.randtest.Rd index c2cf553..a7f17a3 100644 --- a/man/plotHist.randtest.Rd +++ b/man/plotHist.randtest.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/randtest.R \name{plotHist.randtest} \alias{plotHist.randtest} diff --git a/man/plotLoadings.Rd b/man/plotLoadings.Rd index bd13153..67c5328 100644 --- a/man/plotLoadings.Rd +++ b/man/plotLoadings.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotLoadings} \alias{plotLoadings} diff --git a/man/plotLoadings.pca.Rd b/man/plotLoadings.pca.Rd index 01c6898..d60a6ac 100755 --- a/man/plotLoadings.pca.Rd +++ b/man/plotLoadings.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{plotLoadings.pca} \alias{plotLoadings.pca} diff --git a/man/plotMisclassified.Rd b/man/plotMisclassified.Rd index 3d165de..5a07bdc 100644 --- a/man/plotMisclassified.Rd +++ b/man/plotMisclassified.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotMisclassified} \alias{plotMisclassified} diff --git a/man/plotMisclassified.classmodel.Rd b/man/plotMisclassified.classmodel.Rd index d199f02..506e93d 100755 --- a/man/plotMisclassified.classmodel.Rd +++ b/man/plotMisclassified.classmodel.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classmodel.R \name{plotMisclassified.classmodel} \alias{plotMisclassified.classmodel} diff --git a/man/plotMisclassified.classres.Rd b/man/plotMisclassified.classres.Rd index 197a881..1042a0d 100755 --- a/man/plotMisclassified.classres.Rd +++ b/man/plotMisclassified.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{plotMisclassified.classres} \alias{plotMisclassified.classres} diff --git a/man/plotModelDistance.Rd b/man/plotModelDistance.Rd index aef51e7..1413785 100644 --- a/man/plotModelDistance.Rd +++ b/man/plotModelDistance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotModelDistance} \alias{plotModelDistance} diff --git a/man/plotModelDistance.simcam.Rd b/man/plotModelDistance.simcam.Rd index 390c4a2..cc91223 100755 --- a/man/plotModelDistance.simcam.Rd +++ b/man/plotModelDistance.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{plotModelDistance.simcam} \alias{plotModelDistance.simcam} diff --git a/man/plotModellingPower.Rd b/man/plotModellingPower.Rd index 6fa7b36..bf9da46 100644 --- a/man/plotModellingPower.Rd +++ b/man/plotModellingPower.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotModellingPower} \alias{plotModellingPower} diff --git a/man/plotModellingPower.simca.Rd b/man/plotModellingPower.simca.Rd index 7083863..4245cd7 100755 --- a/man/plotModellingPower.simca.Rd +++ b/man/plotModellingPower.simca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simca.R \name{plotModellingPower.simca} \alias{plotModellingPower.simca} diff --git a/man/plotModellingPower.simcam.Rd b/man/plotModellingPower.simcam.Rd index 4e53403..7cab264 100755 --- a/man/plotModellingPower.simcam.Rd +++ b/man/plotModellingPower.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{plotModellingPower.simcam} \alias{plotModellingPower.simcam} diff --git a/man/plotPerformance.Rd b/man/plotPerformance.Rd index 9ea0532..eb14976 100644 --- a/man/plotPerformance.Rd +++ b/man/plotPerformance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotPerformance} \alias{plotPerformance} diff --git a/man/plotPerformance.classmodel.Rd b/man/plotPerformance.classmodel.Rd index e480988..95d3d48 100755 --- a/man/plotPerformance.classmodel.Rd +++ b/man/plotPerformance.classmodel.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classmodel.R \name{plotPerformance.classmodel} \alias{plotPerformance.classmodel} @@ -13,7 +13,7 @@ \item{nc}{if there are several classes, which class to make the plot for (NULL - summary for all classes).} -\item{param}{which parameter to make the plot for (\code{'specificity'}, \code{'sensitivity'}, +\item{param}{which parameter to make the plot for (\code{'specificity'}, \code{'sensitivity'}, or \code{'misclassified'})} \item{type}{type of the plot} diff --git a/man/plotPerformance.classres.Rd b/man/plotPerformance.classres.Rd index bc40969..2eb0637 100755 --- a/man/plotPerformance.classres.Rd +++ b/man/plotPerformance.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{plotPerformance.classres} \alias{plotPerformance.classres} @@ -13,7 +13,7 @@ \item{nc}{if there are several classes, which class to make the plot for (NULL - summary for all classes).} -\item{param}{which performance parameter to make the plot for (\code{'sensitivity'}, \code{'specificity'}, +\item{param}{which performance parameter to make the plot for (\code{'sensitivity'}, \code{'specificity'}, \code{'misclassified'}, \code{'all'}).} \item{type}{type of the plot} @@ -31,7 +31,7 @@ \item{...}{most of the graphical parameters from \code{\link{mdaplot}} function can be used.} } \description{ -Makes a plot with classification performance parameters vs. model complexity (e.g. number of +Makes a plot with classification performance parameters vs. model complexity (e.g. number of components) for classification results. } \details{ diff --git a/man/plotPredictions.Rd b/man/plotPredictions.Rd index cf0a76a..60c000a 100644 --- a/man/plotPredictions.Rd +++ b/man/plotPredictions.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotPredictions} \alias{plotPredictions} diff --git a/man/plotPredictions.classmodel.Rd b/man/plotPredictions.classmodel.Rd index 6fa97ae..0994745 100755 --- a/man/plotPredictions.classmodel.Rd +++ b/man/plotPredictions.classmodel.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classmodel.R \name{plotPredictions.classmodel} \alias{plotPredictions.classmodel} @@ -8,8 +8,8 @@ ncomp = NULL, main = NULL, ...) } \arguments{ -\item{obj}{a classification model (object of class \code{simca}, \code{plsda}, etc.). if \code{NULL} value -is specified, the result will be selected automatically by checking the nearest available from +\item{obj}{a classification model (object of class \code{simca}, \code{plsda}, etc.). if \code{NULL} value +is specified, the result will be selected automatically by checking the nearest available from test, cv and calibration results.} \item{res}{which result to make the plot for (\code{'calres'}, \code{'cvres'} or \code{'testres'}).} diff --git a/man/plotPredictions.classres.Rd b/man/plotPredictions.classres.Rd index b6ceeeb..32cb92d 100755 --- a/man/plotPredictions.classres.Rd +++ b/man/plotPredictions.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{plotPredictions.classres} \alias{plotPredictions.classres} @@ -28,7 +28,7 @@ separate values for each, if NULL - model selected number will be used).} \item{ylim}{vector with two values - limits for y axis} -\item{...}{most of the graphical parameters from \code{\link{mdaplotg}} or \code{\link{mdaplot}} function +\item{...}{most of the graphical parameters from \code{\link{mdaplotg}} or \code{\link{mdaplot}} function can be used.} } \description{ diff --git a/man/plotPredictions.pls.Rd b/man/plotPredictions.pls.Rd index 2aeeaba..2b78b35 100755 --- a/man/plotPredictions.pls.Rd +++ b/man/plotPredictions.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotPredictions.pls} \alias{plotPredictions.pls} diff --git a/man/plotPredictions.plsres.Rd b/man/plotPredictions.plsres.Rd index c9aefae..6e6e8b0 100755 --- a/man/plotPredictions.plsres.Rd +++ b/man/plotPredictions.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotPredictions.plsres} \alias{plotPredictions.plsres} diff --git a/man/plotPredictions.regres.Rd b/man/plotPredictions.regres.Rd index 23c64c1..03775e5 100755 --- a/man/plotPredictions.regres.Rd +++ b/man/plotPredictions.regres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{plotPredictions.regres} \alias{plotPredictions.regres} @@ -33,7 +33,7 @@ Shows plot with predicted y values. } \details{ -If reference values are available, the function shows a scatter plot with predicted vs. +If reference values are available, the function shows a scatter plot with predicted vs. reference values, otherwise predicted values are shown vs. object numbers. } diff --git a/man/plotRMSE.Rd b/man/plotRMSE.Rd index 577c399..a74e8bd 100644 --- a/man/plotRMSE.Rd +++ b/man/plotRMSE.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotRMSE} \alias{plotRMSE} diff --git a/man/plotRMSE.ipls.Rd b/man/plotRMSE.ipls.Rd index c0dfb64..1a094d4 100644 --- a/man/plotRMSE.ipls.Rd +++ b/man/plotRMSE.ipls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipls.R \name{plotRMSE.ipls} \alias{plotRMSE.ipls} @@ -25,7 +25,7 @@ \item{...}{other arguments} } \description{ -Shows how RMSE develops for each iteration of iPLS selection +Shows how RMSE develops for each iteration of iPLS selection algorithm } \details{ diff --git a/man/plotRMSE.pls.Rd b/man/plotRMSE.pls.Rd index c61e481..6b3beab 100755 --- a/man/plotRMSE.pls.Rd +++ b/man/plotRMSE.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotRMSE.pls} \alias{plotRMSE.pls} diff --git a/man/plotRMSE.plsres.Rd b/man/plotRMSE.plsres.Rd index a19d7ef..149151c 100755 --- a/man/plotRMSE.plsres.Rd +++ b/man/plotRMSE.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotRMSE.plsres} \alias{plotRMSE.plsres} diff --git a/man/plotRMSE.regres.Rd b/man/plotRMSE.regres.Rd index 24e47b1..32d8b3e 100755 --- a/man/plotRMSE.regres.Rd +++ b/man/plotRMSE.regres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{plotRMSE.regres} \alias{plotRMSE.regres} diff --git a/man/plotRegcoeffs.Rd b/man/plotRegcoeffs.Rd index 20a38cc..c59bd36 100644 --- a/man/plotRegcoeffs.Rd +++ b/man/plotRegcoeffs.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotRegcoeffs} \alias{plotRegcoeffs} diff --git a/man/plotRegcoeffs.pls.Rd b/man/plotRegcoeffs.pls.Rd index 89f0579..46e8b36 100755 --- a/man/plotRegcoeffs.pls.Rd +++ b/man/plotRegcoeffs.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotRegcoeffs.pls} \alias{plotRegcoeffs.pls} diff --git a/man/plotResiduals.Rd b/man/plotResiduals.Rd index b6fdf1e..e4cc0cd 100644 --- a/man/plotResiduals.Rd +++ b/man/plotResiduals.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotResiduals} \alias{plotResiduals} diff --git a/man/plotResiduals.ldecomp.Rd b/man/plotResiduals.ldecomp.Rd index a370cb7..d18eba6 100755 --- a/man/plotResiduals.ldecomp.Rd +++ b/man/plotResiduals.ldecomp.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{plotResiduals.ldecomp} \alias{plotResiduals.ldecomp} diff --git a/man/plotResiduals.pca.Rd b/man/plotResiduals.pca.Rd index bc056d4..2d56f14 100755 --- a/man/plotResiduals.pca.Rd +++ b/man/plotResiduals.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{plotResiduals.pca} \alias{plotResiduals.pca} diff --git a/man/plotResiduals.simcam.Rd b/man/plotResiduals.simcam.Rd index e3234af..c91d640 100755 --- a/man/plotResiduals.simcam.Rd +++ b/man/plotResiduals.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{plotResiduals.simcam} \alias{plotResiduals.simcam} diff --git a/man/plotResiduals.simcamres.Rd b/man/plotResiduals.simcamres.Rd index 3ce52c0..3e3dd84 100755 --- a/man/plotResiduals.simcamres.Rd +++ b/man/plotResiduals.simcamres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcamres.R \name{plotResiduals.simcamres} \alias{plotResiduals.simcamres} diff --git a/man/plotResiduals.simcares.Rd b/man/plotResiduals.simcares.Rd index 85be072..64d03f0 100755 --- a/man/plotResiduals.simcares.Rd +++ b/man/plotResiduals.simcares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcares.R \name{plotResiduals.simcares} \alias{plotResiduals.simcares} diff --git a/man/plotScores.Rd b/man/plotScores.Rd index 6908185..4c9494a 100644 --- a/man/plotScores.Rd +++ b/man/plotScores.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotScores} \alias{plotScores} diff --git a/man/plotScores.ldecomp.Rd b/man/plotScores.ldecomp.Rd index 755e430..2317da7 100755 --- a/man/plotScores.ldecomp.Rd +++ b/man/plotScores.ldecomp.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{plotScores.ldecomp} \alias{plotScores.ldecomp} diff --git a/man/plotScores.pca.Rd b/man/plotScores.pca.Rd index 9a83da8..8df66e9 100755 --- a/man/plotScores.pca.Rd +++ b/man/plotScores.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{plotScores.pca} \alias{plotScores.pca} diff --git a/man/plotSelection.Rd b/man/plotSelection.Rd index c850657..d9738b1 100644 --- a/man/plotSelection.Rd +++ b/man/plotSelection.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotSelection} \alias{plotSelection} diff --git a/man/plotSelection.ipls.Rd b/man/plotSelection.ipls.Rd index 74c62f9..93db396 100644 --- a/man/plotSelection.ipls.Rd +++ b/man/plotSelection.ipls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipls.R \name{plotSelection.ipls} \alias{plotSelection.ipls} @@ -33,13 +33,13 @@ first iteration } \details{ The plot shows intervals as bars, which height corresponds to RMSECV obtained when particular -interval was selected (forward) or excluded (backward) from a model at the first iteration. -The intervals found optimal after backward/forward iPLS selection are shown with green color +interval was selected (forward) or excluded (backward) from a model at the first iteration. +The intervals found optimal after backward/forward iPLS selection are shown with green color while the other intervals are gray. See examples in help for \code{\link{ipls}} function. -} -\seealso{ -\code{\link{summary.ipls}}, \code{\link{plotRMSE.ipls}} + + @seealso + \code{\link{summary.ipls}}, \code{\link{plotRMSE.ipls}} } diff --git a/man/plotSelectivityRatio.Rd b/man/plotSelectivityRatio.Rd index c87af87..e060b6c 100644 --- a/man/plotSelectivityRatio.Rd +++ b/man/plotSelectivityRatio.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotSelectivityRatio} \alias{plotSelectivityRatio} diff --git a/man/plotSelectivityRatio.pls.Rd b/man/plotSelectivityRatio.pls.Rd index 3d537a5..452fb44 100755 --- a/man/plotSelectivityRatio.pls.Rd +++ b/man/plotSelectivityRatio.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotSelectivityRatio.pls} \alias{plotSelectivityRatio.pls} diff --git a/man/plotSensitivity.Rd b/man/plotSensitivity.Rd index 7bfa7a5..36cb5a9 100644 --- a/man/plotSensitivity.Rd +++ b/man/plotSensitivity.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotSensitivity} \alias{plotSensitivity} diff --git a/man/plotSensitivity.classmodel.Rd b/man/plotSensitivity.classmodel.Rd index 053629a..aa829a0 100755 --- a/man/plotSensitivity.classmodel.Rd +++ b/man/plotSensitivity.classmodel.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classmodel.R \name{plotSensitivity.classmodel} \alias{plotSensitivity.classmodel} diff --git a/man/plotSensitivity.classres.Rd b/man/plotSensitivity.classres.Rd index f65a1cf..e7c8938 100755 --- a/man/plotSensitivity.classres.Rd +++ b/man/plotSensitivity.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{plotSensitivity.classres} \alias{plotSensitivity.classres} @@ -14,7 +14,7 @@ \item{...}{most of the graphical parameters from \code{\link{mdaplot}} function can be used.} } \description{ -Makes a plot with sensitivity values vs. model complexity (e.g. number of components) for +Makes a plot with sensitivity values vs. model complexity (e.g. number of components) for classification results. } \details{ diff --git a/man/plotSpecificity.Rd b/man/plotSpecificity.Rd index 229b16a..a1f9dd4 100644 --- a/man/plotSpecificity.Rd +++ b/man/plotSpecificity.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotSpecificity} \alias{plotSpecificity} diff --git a/man/plotSpecificity.classmodel.Rd b/man/plotSpecificity.classmodel.Rd index 264c2da..ae6ac58 100755 --- a/man/plotSpecificity.classmodel.Rd +++ b/man/plotSpecificity.classmodel.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classmodel.R \name{plotSpecificity.classmodel} \alias{plotSpecificity.classmodel} diff --git a/man/plotSpecificity.classres.Rd b/man/plotSpecificity.classres.Rd index 287b7f0..f01be8b 100755 --- a/man/plotSpecificity.classres.Rd +++ b/man/plotSpecificity.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{plotSpecificity.classres} \alias{plotSpecificity.classres} diff --git a/man/plotVIPScores.Rd b/man/plotVIPScores.Rd index a0fb579..b2b12cf 100644 --- a/man/plotVIPScores.Rd +++ b/man/plotVIPScores.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotVIPScores} \alias{plotVIPScores} diff --git a/man/plotVIPScores.pls.Rd b/man/plotVIPScores.pls.Rd index 2f9e402..8e62136 100755 --- a/man/plotVIPScores.pls.Rd +++ b/man/plotVIPScores.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotVIPScores.pls} \alias{plotVIPScores.pls} diff --git a/man/plotVariance.Rd b/man/plotVariance.Rd index 0e6147e..5594be4 100644 --- a/man/plotVariance.Rd +++ b/man/plotVariance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotVariance} \alias{plotVariance} diff --git a/man/plotVariance.ldecomp.Rd b/man/plotVariance.ldecomp.Rd index 9acb17f..849188b 100755 --- a/man/plotVariance.ldecomp.Rd +++ b/man/plotVariance.ldecomp.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{plotVariance.ldecomp} \alias{plotVariance.ldecomp} diff --git a/man/plotVariance.pca.Rd b/man/plotVariance.pca.Rd index 2b72f3b..8b855a3 100755 --- a/man/plotVariance.pca.Rd +++ b/man/plotVariance.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{plotVariance.pca} \alias{plotVariance.pca} diff --git a/man/plotVariance.pls.Rd b/man/plotVariance.pls.Rd index c628635..ccfdd38 100755 --- a/man/plotVariance.pls.Rd +++ b/man/plotVariance.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotVariance.pls} \alias{plotVariance.pls} diff --git a/man/plotXCumVariance.Rd b/man/plotXCumVariance.Rd index aae4962..5b7cfa2 100644 --- a/man/plotXCumVariance.Rd +++ b/man/plotXCumVariance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotXCumVariance} \alias{plotXCumVariance} diff --git a/man/plotXCumVariance.pls.Rd b/man/plotXCumVariance.pls.Rd index f201147..dc256c0 100755 --- a/man/plotXCumVariance.pls.Rd +++ b/man/plotXCumVariance.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotXCumVariance.pls} \alias{plotXCumVariance.pls} diff --git a/man/plotXCumVariance.plsres.Rd b/man/plotXCumVariance.plsres.Rd index 555dd09..40656ba 100755 --- a/man/plotXCumVariance.plsres.Rd +++ b/man/plotXCumVariance.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotXCumVariance.plsres} \alias{plotXCumVariance.plsres} diff --git a/man/plotXLoadings.Rd b/man/plotXLoadings.Rd index 1102489..153baa7 100644 --- a/man/plotXLoadings.Rd +++ b/man/plotXLoadings.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotXLoadings} \alias{plotXLoadings} diff --git a/man/plotXLoadings.pls.Rd b/man/plotXLoadings.pls.Rd index 9d885c6..596fe16 100755 --- a/man/plotXLoadings.pls.Rd +++ b/man/plotXLoadings.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotXLoadings.pls} \alias{plotXLoadings.pls} diff --git a/man/plotXResiduals.Rd b/man/plotXResiduals.Rd index 439ea5a..b24bca9 100644 --- a/man/plotXResiduals.Rd +++ b/man/plotXResiduals.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotXResiduals} \alias{plotXResiduals} diff --git a/man/plotXResiduals.pls.Rd b/man/plotXResiduals.pls.Rd index dedbc31..cdc289c 100755 --- a/man/plotXResiduals.pls.Rd +++ b/man/plotXResiduals.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotXResiduals.pls} \alias{plotXResiduals.pls} diff --git a/man/plotXResiduals.plsres.Rd b/man/plotXResiduals.plsres.Rd index 6c192f7..6165558 100755 --- a/man/plotXResiduals.plsres.Rd +++ b/man/plotXResiduals.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotXResiduals.plsres} \alias{plotXResiduals.plsres} diff --git a/man/plotXScores.Rd b/man/plotXScores.Rd index 3a4b360..5fa94e1 100644 --- a/man/plotXScores.Rd +++ b/man/plotXScores.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotXScores} \alias{plotXScores} diff --git a/man/plotXScores.pls.Rd b/man/plotXScores.pls.Rd index f7ffbb4..c9f75d5 100755 --- a/man/plotXScores.pls.Rd +++ b/man/plotXScores.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotXScores.pls} \alias{plotXScores.pls} diff --git a/man/plotXScores.plsres.Rd b/man/plotXScores.plsres.Rd index 442f53a..b9bfed1 100755 --- a/man/plotXScores.plsres.Rd +++ b/man/plotXScores.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotXScores.plsres} \alias{plotXScores.plsres} diff --git a/man/plotXVariance.Rd b/man/plotXVariance.Rd index d2f87e9..cc5543f 100644 --- a/man/plotXVariance.Rd +++ b/man/plotXVariance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotXVariance} \alias{plotXVariance} diff --git a/man/plotXVariance.pls.Rd b/man/plotXVariance.pls.Rd index d549ed9..4a58ef0 100755 --- a/man/plotXVariance.pls.Rd +++ b/man/plotXVariance.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotXVariance.pls} \alias{plotXVariance.pls} diff --git a/man/plotXVariance.plsres.Rd b/man/plotXVariance.plsres.Rd index 30afce4..bb8ecf1 100755 --- a/man/plotXVariance.plsres.Rd +++ b/man/plotXVariance.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotXVariance.plsres} \alias{plotXVariance.plsres} diff --git a/man/plotXYLoadings.Rd b/man/plotXYLoadings.Rd index 2ca4920..9f918e5 100644 --- a/man/plotXYLoadings.Rd +++ b/man/plotXYLoadings.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotXYLoadings} \alias{plotXYLoadings} diff --git a/man/plotXYLoadings.pls.Rd b/man/plotXYLoadings.pls.Rd index 4f660d3..496ebaf 100755 --- a/man/plotXYLoadings.pls.Rd +++ b/man/plotXYLoadings.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotXYLoadings.pls} \alias{plotXYLoadings.pls} diff --git a/man/plotXYScores.Rd b/man/plotXYScores.Rd index 1d08fbf..cc2c2f2 100644 --- a/man/plotXYScores.Rd +++ b/man/plotXYScores.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotXYScores} \alias{plotXYScores} diff --git a/man/plotXYScores.pls.Rd b/man/plotXYScores.pls.Rd index 7b41cd3..19fb94e 100755 --- a/man/plotXYScores.pls.Rd +++ b/man/plotXYScores.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotXYScores.pls} \alias{plotXYScores.pls} diff --git a/man/plotXYScores.plsres.Rd b/man/plotXYScores.plsres.Rd index 408f687..3d2e58b 100755 --- a/man/plotXYScores.plsres.Rd +++ b/man/plotXYScores.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotXYScores.plsres} \alias{plotXYScores.plsres} diff --git a/man/plotYCumVariance.Rd b/man/plotYCumVariance.Rd index c9d61aa..31f29e1 100644 --- a/man/plotYCumVariance.Rd +++ b/man/plotYCumVariance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotYCumVariance} \alias{plotYCumVariance} diff --git a/man/plotYCumVariance.pls.Rd b/man/plotYCumVariance.pls.Rd index 6787759..105fb57 100755 --- a/man/plotYCumVariance.pls.Rd +++ b/man/plotYCumVariance.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotYCumVariance.pls} \alias{plotYCumVariance.pls} diff --git a/man/plotYCumVariance.plsres.Rd b/man/plotYCumVariance.plsres.Rd index 98ab8f4..1acc6c4 100755 --- a/man/plotYCumVariance.plsres.Rd +++ b/man/plotYCumVariance.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotYCumVariance.plsres} \alias{plotYCumVariance.plsres} diff --git a/man/plotYResiduals.Rd b/man/plotYResiduals.Rd index 53c7f58..39ad60a 100644 --- a/man/plotYResiduals.Rd +++ b/man/plotYResiduals.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotYResiduals} \alias{plotYResiduals} diff --git a/man/plotYResiduals.pls.Rd b/man/plotYResiduals.pls.Rd index a72df6e..cd84068 100755 --- a/man/plotYResiduals.pls.Rd +++ b/man/plotYResiduals.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotYResiduals.pls} \alias{plotYResiduals.pls} diff --git a/man/plotYResiduals.regres.Rd b/man/plotYResiduals.regres.Rd index a4439b8..d3c98db 100755 --- a/man/plotYResiduals.regres.Rd +++ b/man/plotYResiduals.regres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{plotYResiduals.regres} \alias{plotYResiduals.regres} @@ -27,7 +27,7 @@ \item{...}{other plot parameters (see \code{mdaplot} for details)} } \description{ -Shows plot with Y residuals (difference between predicted and reference values) for selected +Shows plot with Y residuals (difference between predicted and reference values) for selected response variable and complexity (number of components). } diff --git a/man/plotYVariance.Rd b/man/plotYVariance.Rd index 19d53b6..4a5dcb4 100644 --- a/man/plotYVariance.Rd +++ b/man/plotYVariance.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{plotYVariance} \alias{plotYVariance} diff --git a/man/plotYVariance.pls.Rd b/man/plotYVariance.pls.Rd index 4cdb0b5..405942b 100755 --- a/man/plotYVariance.pls.Rd +++ b/man/plotYVariance.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotYVariance.pls} \alias{plotYVariance.pls} diff --git a/man/plotYVariance.plsres.Rd b/man/plotYVariance.plsres.Rd index d8e2d93..ecd6428 100755 --- a/man/plotYVariance.plsres.Rd +++ b/man/plotYVariance.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plotYVariance.plsres} \alias{plotYVariance.plsres} diff --git a/man/pls.Rd b/man/pls.Rd index b05ce46..94d25b9 100644 --- a/man/pls.Rd +++ b/man/pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{pls} \alias{pls} @@ -29,7 +29,7 @@ pls(x, y, ncomp = 15, center = T, scale = F, cv = NULL, x.test = NULL, \item{alpha}{significance level for calculating statistical limits for residuals.} -\item{coeffs.ci}{method to calculate p-values and confidence intervals for regression coefficients (so far only +\item{coeffs.ci}{method to calculate p-values and confidence intervals for regression coefficients (so far only jack-knifing is availavle: \code{='jk'}).} \item{coeffs.alpha}{significance level for calculating confidence intervals for regression coefficients.} @@ -38,54 +38,54 @@ jack-knifing is availavle: \code{='jk'}).} \item{light}{run normal or light (faster) version of PLS without calculationg some performance statistics.} -\item{ncomp.selcrit}{criterion for selecting optimal number of components (\code{'min'} for +\item{ncomp.selcrit}{criterion for selecting optimal number of components (\code{'min'} for first local minimum of RMSECV and \code{'wold'} for Wold's rule.)} } \value{ Returns an object of \code{pls} class with following fields: -\item{ncomp }{number of components included to the model.} -\item{ncomp.selected }{selected (optimal) number of components.} -\item{xloadings }{matrix with loading values for x decomposition.} -\item{yloadings }{matrix with loading values for y decomposition.} -\item{weights }{matrix with PLS weights.} -\item{selratio }{array with selectivity ratio values.} -\item{vipscores }{matrix with VIP scores values.} -\item{coeffs }{object of class \code{\link{regcoeffs}} with regression coefficients calculated for each component.} -\item{info }{information about the model, provided by user when build the model.} -\item{calres }{an object of class \code{\link{plsres}} with PLS results for a calibration data.} -\item{testres }{an object of class \code{\link{plsres}} with PLS results for a test data, if it was provided.} +\item{ncomp }{number of components included to the model.} +\item{ncomp.selected }{selected (optimal) number of components.} +\item{xloadings }{matrix with loading values for x decomposition.} +\item{yloadings }{matrix with loading values for y decomposition.} +\item{weights }{matrix with PLS weights.} +\item{selratio }{array with selectivity ratio values.} +\item{vipscores }{matrix with VIP scores values.} +\item{coeffs }{object of class \code{\link{regcoeffs}} with regression coefficients calculated for each component.} +\item{info }{information about the model, provided by user when build the model.} +\item{calres }{an object of class \code{\link{plsres}} with PLS results for a calibration data.} +\item{testres }{an object of class \code{\link{plsres}} with PLS results for a test data, if it was provided.} \item{cvres }{an object of class \code{\link{plsres}} with PLS results for cross-validation, if this option was chosen.} } \description{ -\code{pls} is used to calibrate, validate and use of partial least squares (PLS) +\code{pls} is used to calibrate, validate and use of partial least squares (PLS) regression model. } \details{ So far only SIMPLS method [1] is available, more coming soon. Implementation works both with one and multiple response variables. -Like in \code{\link{pca}}, \code{pls} uses number of components (\code{ncomp}) as a minimum of -number of objects - 1, number of x variables and the default or provided value. Regression +Like in \code{\link{pca}}, \code{pls} uses number of components (\code{ncomp}) as a minimum of +number of objects - 1, number of x variables and the default or provided value. Regression coefficients, predictions and other results are calculated for each set of components from 1 -to \code{ncomp}: 1, 1:2, 1:3, etc. The optimal number of components, (\code{ncomp.selected}), +to \code{ncomp}: 1, 1:2, 1:3, etc. The optimal number of components, (\code{ncomp.selected}), is found using Wold's R criterion, but can be adjusted by user using function -(\code{\link{selectCompNum.pls}}). The selected optimal number of components is used for all -default operations - predictions, plots, etc. +(\code{\link{selectCompNum.pls}}). The selected optimal number of components is used for all +default operations - predictions, plots, etc. Selectivity ratio [2] and VIP scores [3] are calculated for any PLS model authomatically, however -while selectivity ratio values are calculated for all computed components, the VIP scores are -computed only for selected components (to save calculation time) and recalculated every time when -\code{selectCompNum()} is called for the model. +while selectivity ratio values are calculated for all computed components, the VIP scores are +computed only for selected components (to save calculation time) and recalculated every time when +\code{selectCompNum()} is called for the model. Calculation of confidence intervals and p-values for regression coefficients are available only by jack-knifing so far. See help for \code{\link{regcoeffs}} objects for details. } \examples{ ### Examples of using PLS model class -library(mdatools) - -## 1. Make a PLS model for concentration of first component -## using full-cross validation and automatic detection of +library(mdatools) + +## 1. Make a PLS model for concentration of first component +## using full-cross validation and automatic detection of ## optimal number of components and show an overview data(simdata) @@ -96,7 +96,7 @@ model = pls(x, y, ncomp = 8, cv = 1) summary(model) plot(model) -## 2. Make a PLS model for concentration of first component +## 2. Make a PLS model for concentration of first component ## using test set and 10 segment cross-validation and show overview data(simdata) @@ -110,7 +110,7 @@ model = selectCompNum(model, 2) summary(model) plot(model) -## 3. Make a PLS model for concentration of first component +## 3. Make a PLS model for concentration of first component ## using only test set validation and show overview data(simdata) @@ -187,6 +187,7 @@ points(i[selvar], ms[selvar], col = 'red', pch = 16) plotPredictions(modelsel) par(mfrow = c(1, 1)) + } \author{ Sergey Kucheryavskiy (svkucheryavski@gmail.com) @@ -206,7 +207,7 @@ Methods for \code{pls} objects: \code{\link{predict.pls}} \tab applies PLS model to a new data.\cr \code{\link{selectCompNum.pls}} \tab set number of optimal components in the model.\cr \code{\link{plotPredictions.pls}} \tab shows predicted vs. measured plot.\cr - \code{\link{plotRegcoeffs.pls}} \tab shows regression coefficients plot.\cr + \code{\link{plotRegcoeffs.pls}} \tab shows regression coefficients plot.\cr \code{\link{plotXScores.pls}} \tab shows scores plot for x decomposition.\cr \code{\link{plotXYScores.pls}} \tab shows scores plot for x and y decomposition.\cr \code{\link{plotXLoadings.pls}} \tab shows loadings plot for x decomposition.\cr @@ -214,9 +215,9 @@ Methods for \code{pls} objects: \code{\link{plotRMSE.pls}} \tab shows RMSE plot.\cr \code{\link{plotXVariance.pls}} \tab shows explained variance plot for x decomposition.\cr \code{\link{plotYVariance.pls}} \tab shows explained variance plot for y decomposition.\cr - \code{\link{plotXCumVariance.pls}} \tab shows cumulative explained variance plot for y + \code{\link{plotXCumVariance.pls}} \tab shows cumulative explained variance plot for y decomposition.\cr - \code{\link{plotYCumVariance.pls}} \tab shows cumulative explained variance plot for y + \code{\link{plotYCumVariance.pls}} \tab shows cumulative explained variance plot for y decomposition.\cr \code{\link{plotXResiduals.pls}} \tab shows T2 vs. Q plot for x decomposition.\cr \code{\link{plotYResiduals.pls}} \tab shows residuals plot for y values.\cr @@ -226,10 +227,10 @@ Methods for \code{pls} objects: \code{\link{getVIPScores.pls}} \tab returns vector with VIP scores values.\cr \code{\link{getRegcoeffs.pls}} \tab returns matrix with regression coefficients.\cr } - -Most of the methods for plotting data (except loadings and regression coefficients) are also -available for PLS results -(\code{\link{plsres}}) objects. There is also a randomization test for PLS-regression + +Most of the methods for plotting data (except loadings and regression coefficients) are also +available for PLS results +(\code{\link{plsres}}) objects. There is also a randomization test for PLS-regression (\code{\link{randtest}}). } diff --git a/man/pls.cal.Rd b/man/pls.cal.Rd index ee38cd7..957be34 100755 --- a/man/pls.cal.Rd +++ b/man/pls.cal.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{pls.cal} \alias{pls.cal} diff --git a/man/pls.calculateSelectivityRatio.Rd b/man/pls.calculateSelectivityRatio.Rd index 0f56d37..2643fa4 100755 --- a/man/pls.calculateSelectivityRatio.Rd +++ b/man/pls.calculateSelectivityRatio.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{pls.calculateSelectivityRatio} \alias{pls.calculateSelectivityRatio} diff --git a/man/pls.calculateVIPScores.Rd b/man/pls.calculateVIPScores.Rd index b7a5e78..d2dbbaf 100755 --- a/man/pls.calculateVIPScores.Rd +++ b/man/pls.calculateVIPScores.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{pls.calculateVIPScores} \alias{pls.calculateVIPScores} @@ -13,7 +13,7 @@ pls.calculateVIPScores(object) matrix \code{nvar x ny} with VIP score values for selected number of components } \description{ -Calculates VIP (Variable Importance in Projection) scores for each component and +Calculates VIP (Variable Importance in Projection) scores for each component and response variable in the PLS model } diff --git a/man/pls.crossval.Rd b/man/pls.crossval.Rd index 13d9b92..a7015a2 100755 --- a/man/pls.crossval.Rd +++ b/man/pls.crossval.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{pls.crossval} \alias{pls.crossval} diff --git a/man/pls.simpls.Rd b/man/pls.simpls.Rd index dfac8a9..b1505f5 100755 --- a/man/pls.simpls.Rd +++ b/man/pls.simpls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{pls.simpls} \alias{pls.simpls} @@ -23,7 +23,7 @@ and weights. SIMPLS algorithm for calibration of PLS model } \references{ -[1]. S. de Jong. SIMPLS: An Alternative approach to partial least squares regression. +[1]. S. de Jong. SIMPLS: An Alternative approach to partial least squares regression. Chemometrics and Intelligent Laboratory Systems, 18, 1993 (251-263). } diff --git a/man/plsda.Rd b/man/plsda.Rd index c2b9e7d..1497005 100644 --- a/man/plsda.Rd +++ b/man/plsda.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsda.R \name{plsda} \alias{plsda} @@ -30,7 +30,7 @@ plsda(x, c, ncomp = 15, center = T, scale = F, cv = NULL, \item{alpha}{significance level for calculating statistical limits for residuals.} -\item{coeffs.ci}{method to calculate p-values and confidence intervals for regression coefficients (so far only +\item{coeffs.ci}{method to calculate p-values and confidence intervals for regression coefficients (so far only jack-knifing is availavle: \code{='jk'}).} \item{coeffs.alpha}{significance level for calculating confidence intervals for regression coefficients.} @@ -39,33 +39,33 @@ jack-knifing is availavle: \code{='jk'}).} \item{light}{run normal or light (faster) version of PLS without calculationg some performance statistics.} -\item{ncomp.selcrit}{criterion for selecting optimal number of components (\code{'min'} for first local minimum of +\item{ncomp.selcrit}{criterion for selecting optimal number of components (\code{'min'} for first local minimum of RMSECV and \code{'wold'} for Wold's rule.)} } \value{ -Returns an object of \code{plsda} class with following fields (most inherited from class +Returns an object of \code{plsda} class with following fields (most inherited from class \code{pls}): -\item{ncomp }{number of components included to the model.} -\item{ncomp.selected }{selected (optimal) number of components.} -\item{xloadings }{matrix with loading values for x decomposition.} -\item{yloadings }{matrix with loading values for y (c) decomposition.} -\item{weights }{matrix with PLS weights.} -\item{coeffs }{matrix with regression coefficients calculated for each component.} -\item{info }{information about the model, provided by user when build the model.} -\item{calres }{an object of class \code{\link{plsdares}} with PLS-DA results for a calibration -data.} -\item{testres }{an object of class \code{\link{plsdares}} with PLS-DA results for a test data, -if it was provided.} +\item{ncomp }{number of components included to the model.} +\item{ncomp.selected }{selected (optimal) number of components.} +\item{xloadings }{matrix with loading values for x decomposition.} +\item{yloadings }{matrix with loading values for y (c) decomposition.} +\item{weights }{matrix with PLS weights.} +\item{coeffs }{matrix with regression coefficients calculated for each component.} +\item{info }{information about the model, provided by user when build the model.} +\item{calres }{an object of class \code{\link{plsdares}} with PLS-DA results for a calibration +data.} +\item{testres }{an object of class \code{\link{plsdares}} with PLS-DA results for a test data, +if it was provided.} \item{cvres }{an object of class \code{\link{plsdares}} with PLS-DA results for cross-validation, if this option was chosen.} } \description{ -\code{plsda} is used to calibrate, validate and use of partial least squares discrimination +\code{plsda} is used to calibrate, validate and use of partial least squares discrimination analysis (PLS-DA) model. } \details{ -The \code{plsda} class is based on \code{pls} with extra functions and plots covering -classification functionality. All plots for \code{pls} can be used. E.g. of you want to see the +The \code{plsda} class is based on \code{pls} with extra functions and plots covering +classification functionality. All plots for \code{pls} can be used. E.g. of you want to see the real predicted values (y in PLS) instead of classes use \code{plotPredictions.pls(model)} instead of \code{plotPredictions(model)}. @@ -81,7 +81,7 @@ library(mdatools) # make a calibration set from iris data (3 classes) # use names of classes as class vector -x.cal = iris[seq(1, nrow(iris), 2), 1:4] +x.cal = iris[seq(1, nrow(iris), 2), 1:4] c.cal = iris[seq(1, nrow(iris), 2), 5] model = plsda(x.cal, c.cal, ncomp = 3, cv = 1, info = 'IRIS data example') @@ -123,6 +123,7 @@ plotYVariance(model) plotXResiduals(model) plotRegcoeffs(model, ny = 2) par(mfrow = c(1, 1)) + } \author{ Sergey Kucheryavskiy (svkucheryavski@gmail.com) diff --git a/man/plsda.crossval.Rd b/man/plsda.crossval.Rd index 6535da4..92ab0a1 100755 --- a/man/plsda.crossval.Rd +++ b/man/plsda.crossval.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsda.R \name{plsda.crossval} \alias{plsda.crossval} diff --git a/man/plsda.getReferenceValues.Rd b/man/plsda.getReferenceValues.Rd index 86de01e..303b551 100755 --- a/man/plsda.getReferenceValues.Rd +++ b/man/plsda.getReferenceValues.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsda.R \name{plsda.getReferenceValues} \alias{plsda.getReferenceValues} @@ -15,7 +15,7 @@ plsda.getReferenceValues(c, classnames = NULL) the generated matrix with one column for each class } \description{ -Generates matrix with reference y values (-1 and +1) for a +Generates matrix with reference y values (-1 and +1) for a vector with class values } diff --git a/man/plsdares.Rd b/man/plsdares.Rd index 0ca2c4c..9f28bfe 100644 --- a/man/plsdares.Rd +++ b/man/plsdares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsdares.R \name{plsdares} \alias{plsdares} @@ -19,16 +19,16 @@ Returns an object of \code{plsdares} class with fields, inherited from \code{\li \code{plsdares} is used to store and visualize results of applying a PLS-DA model to a new data. } \details{ -Do not use \code{plsdares} manually, the object is created automatically when one applies a -PLS-DA model to a new data set, e.g. when calibrate and validate a PLS-DA model (all calibration -and validation results in PLS-DA model are stored as objects of \code{plsdares} class) or use +Do not use \code{plsdares} manually, the object is created automatically when one applies a +PLS-DA model to a new data set, e.g. when calibrate and validate a PLS-DA model (all calibration +and validation results in PLS-DA model are stored as objects of \code{plsdares} class) or use function \code{\link{predict.plsda}}. - -The object gives access to all PLS-DA results as well as to the plotting methods for -visualisation of the results. The \code{plsidares} class also inherits all properties and methods + +The object gives access to all PLS-DA results as well as to the plotting methods for +visualisation of the results. The \code{plsidares} class also inherits all properties and methods of \code{classres} and \code{plsres} classes. -If no reference values provided, classification statistics will not be calculated and performance +If no reference values provided, classification statistics will not be calculated and performance plots will not be available. } \examples{ @@ -41,7 +41,7 @@ library(mdatools) # make a calibration set from iris data (3 classes) # use names of classes as class vector -x.cal = iris[seq(1, nrow(iris), 2), 1:4] +x.cal = iris[seq(1, nrow(iris), 2), 1:4] c.cal = iris[seq(1, nrow(iris), 2), 5] model = plsda(x.cal, c.cal, ncomp = 3, cv = 1, info = 'IRIS data example') @@ -56,7 +56,7 @@ plot(res) ## 2. Apply the calibrated PLS-DA model to a new dataset # make a new data -x.new = iris[seq(2, nrow(iris), 2), 1:4] +x.new = iris[seq(2, nrow(iris), 2), 1:4] c.new = iris[seq(2, nrow(iris), 2), 5] res = predict(model, x.new, c.new) @@ -86,6 +86,7 @@ plotYVariance(res, type = 'h') plotXVariance(res, type = 'h') plotXResiduals(res) par(mfrow = c(1, 1)) + } \seealso{ Methods for \code{plsda} objects: @@ -113,9 +114,9 @@ Methods, inherited from \code{plsres} class: \code{\link{plotRMSE.plsres}} \tab shows RMSE plot.\cr \code{\link{plotXVariance.plsres}} \tab shows explained variance plot for x decomposition.\cr \code{\link{plotYVariance.plsres}} \tab shows explained variance plot for y decomposition.\cr - \code{\link{plotXCumVariance.plsres}} \tab shows cumulative explained variance plot for y + \code{\link{plotXCumVariance.plsres}} \tab shows cumulative explained variance plot for y decomposition.\cr - \code{\link{plotYCumVariance.plsres}} \tab shows cumulative explained variance plot for y + \code{\link{plotYCumVariance.plsres}} \tab shows cumulative explained variance plot for y decomposition.\cr \code{\link{plotXResiduals.plsres}} \tab shows T2 vs. Q plot for x decomposition.\cr \code{\link{plotYResiduals.regres}} \tab shows residuals plot for y values.\cr diff --git a/man/plsres.Rd b/man/plsres.Rd index ff2472f..687694a 100644 --- a/man/plsres.Rd +++ b/man/plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{plsres} \alias{plsres} @@ -22,38 +22,38 @@ plsres(y.pred, y.ref = NULL, ncomp.selected = NULL, xdecomp = NULL, } \value{ Returns an object of \code{plsres} class with following fields: -\item{ncomp }{number of components included to the model.} -\item{ncomp.selected }{selected (optimal) number of components.} -\item{y.ref }{a matrix with reference values for responses.} -\item{y.pred }{a matrix with predicted values for responses.} -\item{rmse }{a matrix with root mean squared error values for each response and component.} -\item{slope }{a matrix with slope values for each response and component.} -\item{r2 }{a matrix with determination coefficients for each response and component.} -\item{bias }{a matrix with bias values for each response and component.} -\item{sep }{a matrix with standard error values for each response and component.} -\item{rpd }{a matrix with RPD values for each response and component.} -\item{xdecomp }{decomposition of predictors (object of class \code{ldecomp}).} -\item{ydecomp }{decomposition of responses (object of class \code{ldecomp}).} +\item{ncomp }{number of components included to the model.} +\item{ncomp.selected }{selected (optimal) number of components.} +\item{y.ref }{a matrix with reference values for responses.} +\item{y.pred }{a matrix with predicted values for responses.} +\item{rmse }{a matrix with root mean squared error values for each response and component.} +\item{slope }{a matrix with slope values for each response and component.} +\item{r2 }{a matrix with determination coefficients for each response and component.} +\item{bias }{a matrix with bias values for each response and component.} +\item{sep }{a matrix with standard error values for each response and component.} +\item{rpd }{a matrix with RPD values for each response and component.} +\item{xdecomp }{decomposition of predictors (object of class \code{ldecomp}).} +\item{ydecomp }{decomposition of responses (object of class \code{ldecomp}).} \item{info }{information about the object.} } \description{ \code{plsres} is used to store and visualize results of applying a PLS model to a new data. } \details{ -Do not use \code{plsres} manually, the object is created automatically when one applies a PLS -model to a new data set, e.g. when calibrate and validate a PLS model (all calibration and -validation results in PLS model are stored as objects of \code{plsres} class) or use function +Do not use \code{plsres} manually, the object is created automatically when one applies a PLS +model to a new data set, e.g. when calibrate and validate a PLS model (all calibration and +validation results in PLS model are stored as objects of \code{plsres} class) or use function \code{\link{predict.pls}}. -The object gives access to all PLS results as well as to the plotting methods for visualisation +The object gives access to all PLS results as well as to the plotting methods for visualisation of the results. The \code{plsres} class also inherits all properties and methods of \code{regres} - - general class for regression results. + - general class for regression results. -If no reference values provided, regression statistics will not be calculated and most of the -plots not available. The class is also used for cross-validation results, in this case some of +If no reference values provided, regression statistics will not be calculated and most of the +plots not available. The class is also used for cross-validation results, in this case some of the values and methods are not available (e.g. scores and scores plot, etc.). -All plots are based on \code{\link{mdaplot}} function, so most of its options can be used (e.g. +All plots are based on \code{\link{mdaplot}} function, so most of its options can be used (e.g. color grouping, etc.). RPD is ratio of standard deviation of response values to standard error of prediction (SDy/SEP). @@ -61,7 +61,7 @@ RPD is ratio of standard deviation of response values to standard error of predi \examples{ ### Examples of using PLS result class library(mdatools) -## 1. Make a PLS model for concentration of first component +## 1. Make a PLS model for concentration of first component ## using full-cross validation and get calibration results data(simdata) @@ -75,7 +75,7 @@ res = model$calres summary(res) plot(res) -## 2. Make a PLS model for concentration of first component +## 2. Make a PLS model for concentration of first component ## and apply model to a new dataset data(simdata) @@ -116,6 +116,7 @@ plotYResiduals(res, show.label = TRUE) plotPredictions(res) plotPredictions(res, ncomp = 4, xlab = 'C, reference', ylab = 'C, predictions') par(mfrow = c(1, 1)) + } \seealso{ Methods for \code{plsres} objects: @@ -129,9 +130,9 @@ Methods for \code{plsres} objects: \code{\link{plotRMSE.plsres}} \tab shows RMSE plot.\cr \code{\link{plotXVariance.plsres}} \tab shows explained variance plot for x decomposition.\cr \code{\link{plotYVariance.plsres}} \tab shows explained variance plot for y decomposition.\cr - \code{\link{plotXCumVariance.plsres}} \tab shows cumulative explained variance plot for y + \code{\link{plotXCumVariance.plsres}} \tab shows cumulative explained variance plot for y decomposition.\cr - \code{\link{plotYCumVariance.plsres}} \tab shows cumulative explained variance plot for y + \code{\link{plotYCumVariance.plsres}} \tab shows cumulative explained variance plot for y decomposition.\cr \code{\link{plotXResiduals.plsres}} \tab shows T2 vs. Q plot for x decomposition.\cr \code{\link{plotYResiduals.regres}} \tab shows residuals plot for y values.\cr diff --git a/man/predict.pca.Rd b/man/predict.pca.Rd index e17f9fd..2f07390 100755 --- a/man/predict.pca.Rd +++ b/man/predict.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{predict.pca} \alias{predict.pca} diff --git a/man/predict.pls.Rd b/man/predict.pls.Rd index 9cb6e33..d654061 100755 --- a/man/predict.pls.Rd +++ b/man/predict.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{predict.pls} \alias{predict.pls} diff --git a/man/predict.plsda.Rd b/man/predict.plsda.Rd index 645ffd1..8ff7caa 100755 --- a/man/predict.plsda.Rd +++ b/man/predict.plsda.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsda.R \name{predict.plsda} \alias{predict.plsda} diff --git a/man/predict.simca.Rd b/man/predict.simca.Rd index 67ed8aa..144bd28 100755 --- a/man/predict.simca.Rd +++ b/man/predict.simca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simca.R \name{predict.simca} \alias{predict.simca} diff --git a/man/predict.simcam.Rd b/man/predict.simcam.Rd index 153503a..4f051bb 100755 --- a/man/predict.simcam.Rd +++ b/man/predict.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{predict.simcam} \alias{predict.simcam} diff --git a/man/prep.autoscale.Rd b/man/prep.autoscale.Rd index 2594ed1..062a48c 100755 --- a/man/prep.autoscale.Rd +++ b/man/prep.autoscale.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prep.R \name{prep.autoscale} \alias{prep.autoscale} diff --git a/man/prep.msc.Rd b/man/prep.msc.Rd index 7a788d0..64094b2 100755 --- a/man/prep.msc.Rd +++ b/man/prep.msc.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prep.R \name{prep.msc} \alias{prep.msc} @@ -18,21 +18,22 @@ list with two fields - preprocessed spectra and calculated mean spectrum Applies Multiplicative Scatter Correction (MSC) transformation to data matrix (spectra) } \details{ -MSC is used to remove scatter effects (baseline offset and slope) from +MSC is used to remove scatter effects (baseline offset and slope) from spectral data, e.g. NIR spectra. -} -\examples{ -### Apply MSC to spectra from simdata - + + @examples + + ### Apply MSC to spectra from simdata + library(mdatools) data(simdata) - + spectra = simdata$spectra.c wavelength = simdata$wavelength - + res = prep.msc(spectra) cspectra = res$cspectra - + par(mfrow = c(2, 1)) mdaplot(cbind(wavelength, t(spectra)), type = 'l', main = 'Before MSC') mdaplot(cbind(wavelength, t(cspectra)), type = 'l', main = 'After MSC') diff --git a/man/prep.norm.Rd b/man/prep.norm.Rd index 31befbc..bb84e62 100644 --- a/man/prep.norm.Rd +++ b/man/prep.norm.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prep.R \name{prep.norm} \alias{prep.norm} diff --git a/man/prep.savgol.Rd b/man/prep.savgol.Rd index 041cc9f..cd9c1f7 100755 --- a/man/prep.savgol.Rd +++ b/man/prep.savgol.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prep.R \name{prep.savgol} \alias{prep.savgol} diff --git a/man/prep.snv.Rd b/man/prep.snv.Rd index 54396de..eafea2c 100755 --- a/man/prep.snv.Rd +++ b/man/prep.snv.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prep.R \name{prep.snv} \alias{prep.snv} @@ -16,20 +16,21 @@ data matrix with processed values Applies Standard Normal Variate (SNV) transformation to the rows of data matrix } \details{ -SNV is a simple preprocessing to remove scatter effects (baseline offset and slope) from +SNV is a simple preprocessing to remove scatter effects (baseline offset and slope) from spectral data, e.g. NIR spectra. -} -\examples{ -### Apply SNV to spectra from simdata - + + @examples + + ### Apply SNV to spectra from simdata + library(mdatools) data(simdata) - + spectra = simdata$spectra.c wavelength = simdata$wavelength - + cspectra = prep.snv(spectra) - + par(mfrow = c(2, 1)) mdaplot(cbind(wavelength, t(spectra)), type = 'l', main = 'Before SNV') mdaplot(cbind(wavelength, t(cspectra)), type = 'l', main = 'After SNV') diff --git a/man/print.classres.Rd b/man/print.classres.Rd index d41f299..e60bc20 100755 --- a/man/print.classres.Rd +++ b/man/print.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{print.classres} \alias{print.classres} diff --git a/man/print.ipls.Rd b/man/print.ipls.Rd index 388a39d..6fe75cc 100644 --- a/man/print.ipls.Rd +++ b/man/print.ipls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipls.R \name{print.ipls} \alias{print.ipls} diff --git a/man/print.ldecomp.Rd b/man/print.ldecomp.Rd index 91b8a7f..e39d797 100755 --- a/man/print.ldecomp.Rd +++ b/man/print.ldecomp.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{print.ldecomp} \alias{print.ldecomp} diff --git a/man/print.pca.Rd b/man/print.pca.Rd index 4da40fc..53c5079 100755 --- a/man/print.pca.Rd +++ b/man/print.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{print.pca} \alias{print.pca} diff --git a/man/print.pcares.Rd b/man/print.pcares.Rd index 2001274..439963d 100755 --- a/man/print.pcares.Rd +++ b/man/print.pcares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pcares.R \name{print.pcares} \alias{print.pcares} diff --git a/man/print.pls.Rd b/man/print.pls.Rd index 01ac41b..2b21ca5 100755 --- a/man/print.pls.Rd +++ b/man/print.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{print.pls} \alias{print.pls} diff --git a/man/print.plsda.Rd b/man/print.plsda.Rd index f96ac2c..b4a26d0 100755 --- a/man/print.plsda.Rd +++ b/man/print.plsda.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsda.R \name{print.plsda} \alias{print.plsda} diff --git a/man/print.plsdares.Rd b/man/print.plsdares.Rd index d788219..553035d 100755 --- a/man/print.plsdares.Rd +++ b/man/print.plsdares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsdares.R \name{print.plsdares} \alias{print.plsdares} diff --git a/man/print.plsres.Rd b/man/print.plsres.Rd index ec0ea3f..33532d3 100755 --- a/man/print.plsres.Rd +++ b/man/print.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{print.plsres} \alias{print.plsres} diff --git a/man/print.randtest.Rd b/man/print.randtest.Rd index 76ff552..df92444 100644 --- a/man/print.randtest.Rd +++ b/man/print.randtest.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/randtest.R \name{print.randtest} \alias{print.randtest} diff --git a/man/print.regcoeffs.Rd b/man/print.regcoeffs.Rd index e75eac5..9d1c9ba 100755 --- a/man/print.regcoeffs.Rd +++ b/man/print.regcoeffs.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regcoeffs.R \name{print.regcoeffs} \alias{print.regcoeffs} diff --git a/man/print.regres.Rd b/man/print.regres.Rd index a56afb8..c7afe9b 100755 --- a/man/print.regres.Rd +++ b/man/print.regres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{print.regres} \alias{print.regres} diff --git a/man/print.simca.Rd b/man/print.simca.Rd index 8b022ac..599b8aa 100755 --- a/man/print.simca.Rd +++ b/man/print.simca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simca.R \name{print.simca} \alias{print.simca} diff --git a/man/print.simcam.Rd b/man/print.simcam.Rd index a623d36..711bcdb 100755 --- a/man/print.simcam.Rd +++ b/man/print.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{print.simcam} \alias{print.simcam} diff --git a/man/print.simcamres.Rd b/man/print.simcamres.Rd index ab1a208..b8c5a43 100755 --- a/man/print.simcamres.Rd +++ b/man/print.simcamres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcamres.R \name{print.simcamres} \alias{print.simcamres} diff --git a/man/print.simcares.Rd b/man/print.simcares.Rd index a8a3c0f..a57a359 100755 --- a/man/print.simcares.Rd +++ b/man/print.simcares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcares.R \name{print.simcares} \alias{print.simcares} diff --git a/man/randtest.Rd b/man/randtest.Rd index 50c0e45..6153c06 100644 --- a/man/randtest.Rd +++ b/man/randtest.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/randtest.R \name{randtest} \alias{randtest} @@ -26,33 +26,33 @@ randtest(x, y, ncomp = 15, center = T, scale = F, nperm = 1000, } \value{ Returns an object of \code{randtest} class with following fields: -\item{nperm }{number of permutations used for the test.} -\item{stat }{statistic values calculated for each component.} -\item{alpha }{alpha values calculated for each component.} -\item{statperm }{matrix with statistic values for each permutation.} -\item{corrperm }{matrix with correlation between predicted and reference y-vales for each -permutation.} +\item{nperm }{number of permutations used for the test.} +\item{stat }{statistic values calculated for each component.} +\item{alpha }{alpha values calculated for each component.} +\item{statperm }{matrix with statistic values for each permutation.} +\item{corrperm }{matrix with correlation between predicted and reference y-vales for each +permutation.} \item{ncomp.selected }{suggested number of components.} } \description{ \code{randtest} is used to carry out randomization/permutation test for a PLS regression model } \details{ -The class implements a method for selection of optimal number of components in PLS1 regression +The class implements a method for selection of optimal number of components in PLS1 regression based on the randomization test [1]. The basic idea is that for each component from 1 to -\code{ncomp} a statistic T, which is a covariance between t-score (X score, derived from a PLS -model) and the reference Y values, is calculated. By repeating this for randomly permuted -Y-values a distribution of the statistic is obtained. A parameter \code{alpha} is computed to -show how often the statistic T, calculated for permuted Y-values, is the same or higher than +\code{ncomp} a statistic T, which is a covariance between t-score (X score, derived from a PLS +model) and the reference Y values, is calculated. By repeating this for randomly permuted +Y-values a distribution of the statistic is obtained. A parameter \code{alpha} is computed to +show how often the statistic T, calculated for permuted Y-values, is the same or higher than the same statistic, calculated for original data without permutations. -If a component is important, then the covariance for unpermuted data should be larger than the -covariance for permuted data and therefore the value for \code{alpha} will be quie small (there -is still a small chance to get similar covariance). This makes \code{alpha} very similar to +If a component is important, then the covariance for unpermuted data should be larger than the +covariance for permuted data and therefore the value for \code{alpha} will be quie small (there +is still a small chance to get similar covariance). This makes \code{alpha} very similar to p-value in a statistical test. -The \code{randtest} procedure calculates alpha for each component, the values can be observed -using \code{summary} or \code{plot} functions. There are also several function, allowing e.g. +The \code{randtest} procedure calculates alpha for each component, the values can be observed +using \code{summary} or \code{plot} functions. There are also several function, allowing e.g. to show distribution of statistics and the critical value for each component. } \examples{ @@ -66,7 +66,7 @@ y = simdata$conc.c[, 3] x = simdata$spectra.c x = prep.snv(x) -## Run the test and show summary +## Run the test and show summary ## (normally use higher nperm values > 1000) r = randtest(x, y, ncomp = 4, nperm = 200, silent = FALSE) summary(r) @@ -80,6 +80,7 @@ plotHist(r, comp = 4) plotCorr(r, 3) plotCorr(r, 4) par( mfrow = c(1, 1)) + } \references{ S. Wiklund et al. Journal of Chemometrics 21 (2007) 427-439. diff --git a/man/regcoeffs.Rd b/man/regcoeffs.Rd index 5484228..ea4b2eb 100755 --- a/man/regcoeffs.Rd +++ b/man/regcoeffs.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regcoeffs.R \name{regcoeffs} \alias{regcoeffs} @@ -9,7 +9,7 @@ regcoeffs(coeffs, ci.coeffs = NULL, ci.alpha = 0.1) \arguments{ \item{coeffs}{vector or matrix with regression coefficients} -\item{ci.coeffs}{array (nobj x ncomp x ny x cv) with regression coefficients for +\item{ci.coeffs}{array (nobj x ncomp x ny x cv) with regression coefficients for computing confidence intervals (e.g. from jack-knifing)} \item{ci.alpha}{significance level for computing of the confidence intervals} diff --git a/man/regcoeffs.getStat.Rd b/man/regcoeffs.getStat.Rd index 172f5db..6850836 100755 --- a/man/regcoeffs.getStat.Rd +++ b/man/regcoeffs.getStat.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regcoeffs.R \name{regcoeffs.getStat} \alias{regcoeffs.getStat} @@ -14,11 +14,11 @@ regcoeffs.getStat(obj, ci.coeffs, ci.alpha = 0.1) \item{ci.alpha}{significance level to calculate the confidence intervals} } \value{ -a list with statistics (\code{$ci} - array with confidence intervals, +a list with statistics (\code{$ci} - array with confidence intervals, \code{$p.values} - array with p-values, \code{$t.values} - array with t-values) } \description{ -calculates confidence intervals and t-test based p-values for +calculates confidence intervals and t-test based p-values for regression coefficients based on jack-knifing procedure } diff --git a/man/regres.Rd b/man/regres.Rd index aa40333..e7ab7ab 100755 --- a/man/regres.Rd +++ b/man/regres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{regres} \alias{regres} diff --git a/man/regres.bias.Rd b/man/regres.bias.Rd index 3d67b96..3795ee2 100755 --- a/man/regres.bias.Rd +++ b/man/regres.bias.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{regres.bias} \alias{regres.bias} diff --git a/man/regres.r2.Rd b/man/regres.r2.Rd index 0a6a1e0..bf5721b 100755 --- a/man/regres.r2.Rd +++ b/man/regres.r2.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{regres.r2} \alias{regres.r2} diff --git a/man/regres.rmse.Rd b/man/regres.rmse.Rd index 21a7459..41e6459 100755 --- a/man/regres.rmse.Rd +++ b/man/regres.rmse.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{regres.rmse} \alias{regres.rmse} diff --git a/man/regres.slope.Rd b/man/regres.slope.Rd index ff227bf..b7bc606 100755 --- a/man/regres.slope.Rd +++ b/man/regres.slope.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{regres.slope} \alias{regres.slope} diff --git a/man/selectCompNum.Rd b/man/selectCompNum.Rd index 2be3a07..56f59f8 100644 --- a/man/selectCompNum.Rd +++ b/man/selectCompNum.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{selectCompNum} \alias{selectCompNum} diff --git a/man/selectCompNum.pca.Rd b/man/selectCompNum.pca.Rd index f21b659..da63980 100755 --- a/man/selectCompNum.pca.Rd +++ b/man/selectCompNum.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{selectCompNum.pca} \alias{selectCompNum.pca} diff --git a/man/selectCompNum.pls.Rd b/man/selectCompNum.pls.Rd index febce8f..54ed067 100755 --- a/man/selectCompNum.pls.Rd +++ b/man/selectCompNum.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{selectCompNum.pls} \alias{selectCompNum.pls} diff --git a/man/showPredictions.Rd b/man/showPredictions.Rd index d3d3d65..d462b56 100644 --- a/man/showPredictions.Rd +++ b/man/showPredictions.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defaults.R \name{showPredictions} \alias{showPredictions} diff --git a/man/showPredictions.classres.Rd b/man/showPredictions.classres.Rd index ea9c433..b6035ea 100755 --- a/man/showPredictions.classres.Rd +++ b/man/showPredictions.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{showPredictions.classres} \alias{showPredictions.classres} diff --git a/man/simca.Rd b/man/simca.Rd index 7d1b86c..cd9ddcd 100644 --- a/man/simca.Rd +++ b/man/simca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simca.R \name{simca} \alias{simca} @@ -33,32 +33,32 @@ simca(x, classname, ncomp = 15, center = T, scale = F, cv = NULL, } \value{ Returns an object of \code{simca} class with following fields: -\item{classname }{a short text with class name.} -\item{modpower }{a matrix with modelling power of variables.} -\item{calres }{an object of class \code{\link{simcares}} with classification results for a -calibration data.} -\item{testres }{an object of class \code{\link{simcares}} with classification results for a test -data, if it was provided.} -\item{cvres }{an object of class \code{\link{simcares}} with classification results for -cross-validation, if this option was chosen.} +\item{classname }{a short text with class name.} +\item{modpower }{a matrix with modelling power of variables.} +\item{calres }{an object of class \code{\link{simcares}} with classification results for a +calibration data.} +\item{testres }{an object of class \code{\link{simcares}} with classification results for a test +data, if it was provided.} +\item{cvres }{an object of class \code{\link{simcares}} with classification results for +cross-validation, if this option was chosen.} Fields, inherited from \code{\link{pca}} class: -\item{ncomp }{number of components included to the model.} -\item{ncomp.selected }{selected (optimal) number of components.} -\item{loadings }{matrix with loading values (nvar x ncomp).} -\item{eigenvals }{vector with eigenvalues for all existent components.} -\item{expvar }{vector with explained variance for each component (in percent).} -\item{cumexpvar }{vector with cumulative explained variance for each component (in percent).} -\item{T2lim }{statistical limit for T2 distance.} -\item{Qlim }{statistical limit for Q residuals.} +\item{ncomp }{number of components included to the model.} +\item{ncomp.selected }{selected (optimal) number of components.} +\item{loadings }{matrix with loading values (nvar x ncomp).} +\item{eigenvals }{vector with eigenvalues for all existent components.} +\item{expvar }{vector with explained variance for each component (in percent).} +\item{cumexpvar }{vector with cumulative explained variance for each component (in percent).} +\item{T2lim }{statistical limit for T2 distance.} +\item{Qlim }{statistical limit for Q residuals.} \item{info }{information about the model, provided by user when build the model.} } \description{ -\code{simca} is used to make SIMCA (Soft Independent Modelling of Class Analogies) model for +\code{simca} is used to make SIMCA (Soft Independent Modelling of Class Analogies) model for one-class classification. } \details{ -SIMCA is in fact PCA model with additional functionality, so \code{simca} class inherits most +SIMCA is in fact PCA model with additional functionality, so \code{simca} class inherits most of the functionality of \code{\link{pca}} class. } \examples{ @@ -68,7 +68,7 @@ library(mdatools) data = iris[, 1:4] class = iris[, 5] -# take first 20 objects of setosa as calibration set +# take first 20 objects of setosa as calibration set se = data[1:20, ] # make SIMCA model and apply to test set @@ -80,7 +80,7 @@ print(model) summary(model) plot(model) -# show predictions +# show predictions par(mfrow = c(2, 1)) plotPredictions(model, show.labels = TRUE) plotPredictions(model, res = 'calres', ncomp = 2, show.labels = TRUE) @@ -93,10 +93,11 @@ plotMisclassified(model) plotModellingPower(model, ncomp = 2, show.labels = TRUE) plotResiduals(model, ncomp = 2) par(mfrow = c(1, 1)) + } \references{ -S. Wold, M. Sjostrom. "SIMCA: A method for analyzing chemical data in terms of similarity and -analogy" in B.R. Kowalski (ed.), Chemometrics Theory and Application, American Chemical Society +S. Wold, M. Sjostrom. "SIMCA: A method for analyzing chemical data in terms of similarity and +analogy" in B.R. Kowalski (ed.), Chemometrics Theory and Application, American Chemical Society Symposium Series 52, Wash., D.C., American Chemical Society, p. 243-282. } \seealso{ diff --git a/man/simca.classify.Rd b/man/simca.classify.Rd index 1c921f1..dcecd71 100755 --- a/man/simca.classify.Rd +++ b/man/simca.classify.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simca.R \name{simca.classify} \alias{simca.classify} diff --git a/man/simca.crossval.Rd b/man/simca.crossval.Rd index 949ff58..32ac2ba 100755 --- a/man/simca.crossval.Rd +++ b/man/simca.crossval.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simca.R \name{simca.crossval} \alias{simca.crossval} diff --git a/man/simcam.Rd b/man/simcam.Rd index 16b7630..54fb1b3 100644 --- a/man/simcam.Rd +++ b/man/simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{simcam} \alias{simcam} @@ -13,14 +13,14 @@ simcam(models, info = "") } \value{ Returns an object of \code{simcam} class with following fields: -\item{models }{a list with provided SIMCA models.} -\item{dispower }{an array with discrimination power of variables for each pair of individual -models.} -\item{moddist }{a matrix with distance between each each pair of individual models.} -\item{classnames }{vector with names of individual classes.} -\item{nclasses }{number of classes in the object.} -\item{info }{information provided by user when create the object.} -\item{calres }{an object of class \code{\link{simcamres}} with classification results for a +\item{models }{a list with provided SIMCA models.} +\item{dispower }{an array with discrimination power of variables for each pair of individual +models.} +\item{moddist }{a matrix with distance between each each pair of individual models.} +\item{classnames }{vector with names of individual classes.} +\item{nclasses }{number of classes in the object.} +\item{info }{information provided by user when create the object.} +\item{calres }{an object of class \code{\link{simcamres}} with classification results for a calibration data.} } \description{ @@ -28,18 +28,18 @@ calibration data.} } \details{ Besides the possibility for multiclass classification, SIMCAM also provides tools for -investigation of relationship among individual models (classes), such as discrimination power of +investigation of relationship among individual models (classes), such as discrimination power of variables, Cooman's plot, model distance, etc. -When create \code{simcam} object, the calibration data from all individual SIMCA models is -extracted and combined for making predictions and calculate performance of the multi-class model. +When create \code{simcam} object, the calibration data from all individual SIMCA models is +extracted and combined for making predictions and calculate performance of the multi-class model. The results are stored in \code{$calres} field of the model object. } \examples{ ## make a multiclass SIMCA model for Iris data library(mdatools) -# split data +# split data caldata = iris[seq(1, nrow(iris), 2), 1:4] se = caldata[1:25, ] ve = caldata[26:50, ] @@ -83,6 +83,7 @@ par(mfrow = c(1, 1)) res = predict(model, testdata, testdata.cref) summary(res) plotPredictions(res) + } \seealso{ Methods for \code{simca} objects: @@ -91,13 +92,13 @@ Methods for \code{simca} objects: \code{summary.simcam} \tab shows summary statistics for the models.\cr \code{plot.simcam} \tab makes an overview of SIMCAM model with two plots.\cr \code{\link{predict.simcam}} \tab applies SIMCAM model to a new data.\cr - \code{\link{plotModelDistance.simcam}} \tab shows plot with distance between individual + \code{\link{plotModelDistance.simcam}} \tab shows plot with distance between individual models.\cr \code{\link{plotDiscriminationPower.simcam}} \tab shows plot with discrimination power.\cr - \code{\link{plotModellingPower.simcam}} \tab shows plot with modelling power for individual + \code{\link{plotModellingPower.simcam}} \tab shows plot with modelling power for individual model.\cr \code{\link{plotCooman.simcam}} \tab shows Cooman's plot for calibration data.\cr - \code{\link{plotResiduals.simcam}} \tab shows plot with Q vs. T2 residuals for calibration + \code{\link{plotResiduals.simcam}} \tab shows plot with Q vs. T2 residuals for calibration data.\cr } diff --git a/man/simcam.getPerformanceStatistics.Rd b/man/simcam.getPerformanceStatistics.Rd index d2c2651..0c2e8aa 100755 --- a/man/simcam.getPerformanceStatistics.Rd +++ b/man/simcam.getPerformanceStatistics.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{simcam.getPerformanceStatistics} \alias{simcam.getPerformanceStatistics} diff --git a/man/simcamres.Rd b/man/simcamres.Rd index 0b595c0..1664f9c 100644 --- a/man/simcamres.Rd +++ b/man/simcamres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcamres.R \name{simcamres} \alias{simcamres} @@ -18,7 +18,7 @@ simcamres(cres, T2, Q, T2lim, Qlim) \item{Qlim}{vector with Q statistical limits for each class.} } \value{ -Returns an object (list) of class \code{simcamres} with the same fields as \code{\link{classres}} +Returns an object (list) of class \code{simcamres} with the same fields as \code{\link{classres}} plus extra fields for Q and T2 values and limits: \item{c.pred}{predicted class values.} @@ -39,21 +39,21 @@ The following fields are available only if reference values were provided. \code{simcamres} is used to store results for SIMCA multiclass classification. } \details{ -Class \code{simcamres} inherits all properties and methods of class \code{\link{classres}}, plus +Class \code{simcamres} inherits all properties and methods of class \code{\link{classres}}, plus store values necessary to visualise prediction decisions (e.g. Cooman's plot or Residuals plot). -In cotrast to \code{simcares} here only values for optimal (selected) number of components in +In cotrast to \code{simcares} here only values for optimal (selected) number of components in each individual SIMCA models are presented. -There is no need to create a \code{simcamres} object manually, it is created automatically when -make a SIMCAM model (see \code{\link{simcam}}) or apply the model to a new data (see +There is no need to create a \code{simcamres} object manually, it is created automatically when +make a SIMCAM model (see \code{\link{simcam}}) or apply the model to a new data (see \code{\link{predict.simcam}}). The object can be used to show summary and plots for the results. } \examples{ ## make a multiclass SIMCA model for Iris data and apply to test set library(mdatools) -# split data +# split data caldata = iris[seq(1, nrow(iris), 2), 1:4] se = caldata[1:25, ] ve = caldata[26:50, ] @@ -72,7 +72,7 @@ vimodel = selectCompNum(vimodel, 1) vemodel = simca(ve, classname = 'versicolor') vemodel = selectCompNum(vemodel, 1) -# combine models into SIMCAM object, show statistics +# combine models into SIMCAM object, show statistics model = simcam(list(semodel, vimodel, vemodel), info = 'Iris data') res = predict(model, testdata, testdata.cref) summary(res) @@ -96,6 +96,7 @@ plotCooman(res, nc = c(1, 3)) plotResiduals(res) plotResiduals(res, nc = 3) par(mfrow = c(1, 1)) + } \seealso{ Methods for \code{simcamres} objects: diff --git a/man/simcares.Rd b/man/simcares.Rd index 44de02b..082ef3e 100644 --- a/man/simcares.Rd +++ b/man/simcares.Rd @@ -1,8 +1,11 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcares.R \name{simcares} \alias{simcares} -\title{Results of SIMCA one-class classification} +\title{Results of SIMCA one-class classification + + @description +\code{simcares} is used to store results for SIMCA one-class classification.} \usage{ simcares(pres, cres) } @@ -12,7 +15,7 @@ simcares(pres, cres) \item{cres}{results of classification (class \code{classres}).} } \value{ -Returns an object (list) of class \code{simcares} with the same fields as \code{\link{pcares}} +Returns an object (list) of class \code{simcares} with the same fields as \code{\link{pcares}} plus extra fields, inherited from \code{\link{classres}}: \item{c.pred}{predicted class values (+1 or -1).} \item{c.ref}{reference (true) class values if provided.} @@ -25,15 +28,18 @@ The following fields are available only if reference values were provided. \item{sensitivity}{sensitivity of predictions.} } \description{ +Results of SIMCA one-class classification + + @description \code{simcares} is used to store results for SIMCA one-class classification. } \details{ -Class \code{simcares} inherits all properties and methods of class \code{\link{pcares}}, and -has additional properties and functions for representing of classification results, inherited +Class \code{simcares} inherits all properties and methods of class \code{\link{pcares}}, and +has additional properties and functions for representing of classification results, inherited from class \code{\link{classres}}. - -There is no need to create a \code{simcares} object manually, it is created automatically when -build a SIMCA model (see \code{\link{simca}}) or apply the model to a new data (see + +There is no need to create a \code{simcares} object manually, it is created automatically when +build a SIMCA model (see \code{\link{simca}}) or apply the model to a new data (see \code{\link{predict.simca}}). The object can be used to show summary and plots for the results. } \examples{ @@ -43,7 +49,7 @@ library(mdatools) data = iris[, 1:4] class = iris[, 5] -# take first 30 objects of setosa as calibration set +# take first 30 objects of setosa as calibration set se = data[1:30, ] # make SIMCA model and apply to test set @@ -77,11 +83,11 @@ Methods, inherited from \code{\link{classres}} class: \code{\link{plotPredictions.classres}} \tab makes plot with predicted values.\cr \code{\link{plotSensitivity.classres}} \tab makes plot with sensitivity vs. components values.\cr \code{\link{plotSpecificity.classres}} \tab makes plot with specificity vs. components values.\cr - \code{\link{plotPerformance.classres}} \tab makes plot with both specificity and sensitivity + \code{\link{plotPerformance.classres}} \tab makes plot with both specificity and sensitivity values.\cr } -Methods, inherited from \code{\link{ldecomp}} class: +Methods, inherited from \code{\link{ldecomp}} class: \tabular{ll}{ \code{\link{plotResiduals.ldecomp}} \tab makes Q2 vs. T2 residuals plot.\cr \code{\link{plotScores.ldecomp}} \tab makes scores plot.\cr diff --git a/man/summary.classres.Rd b/man/summary.classres.Rd index 7694234..bef590e 100755 --- a/man/summary.classres.Rd +++ b/man/summary.classres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classres.R \name{summary.classres} \alias{summary.classres} @@ -17,7 +17,7 @@ separate values for each, if NULL - model selected number will be used).} \item{...}{other arguments} } \description{ -Generic \code{summary} function for classification results. Prints performance values for the +Generic \code{summary} function for classification results. Prints performance values for the results. } diff --git a/man/summary.ipls.Rd b/man/summary.ipls.Rd index b548400..2785e80 100644 --- a/man/summary.ipls.Rd +++ b/man/summary.ipls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ipls.R \name{summary.ipls} \alias{summary.ipls} @@ -20,7 +20,7 @@ Shows statistics and algorithm parameters for iPLS results. The method shows information on the algorithm parameters as well as a table with selected or excluded interval. The table has the following columns: 'step' showing on which iteration an interval was selected or excluded, 'start and 'end' show variable indices for the interval, -'nComp' is a number of components used in a model, 'RMSE' is RMSECV for the model and 'R2' is +'nComp' is a number of components used in a model, 'RMSE' is RMSECV for the model and 'R2' is coefficient of determination for the same model. } diff --git a/man/summary.ldecomp.Rd b/man/summary.ldecomp.Rd index 2c3453e..8af56f5 100755 --- a/man/summary.ldecomp.Rd +++ b/man/summary.ldecomp.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ldecomp.R \name{summary.ldecomp} \alias{summary.ldecomp} diff --git a/man/summary.pca.Rd b/man/summary.pca.Rd index c7d70e0..832fb49 100755 --- a/man/summary.pca.Rd +++ b/man/summary.pca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pca.R \name{summary.pca} \alias{summary.pca} diff --git a/man/summary.pcares.Rd b/man/summary.pcares.Rd index a384ffc..7ad4396 100755 --- a/man/summary.pcares.Rd +++ b/man/summary.pcares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pcares.R \name{summary.pcares} \alias{summary.pcares} diff --git a/man/summary.pls.Rd b/man/summary.pls.Rd index 825fdc3..0f66729 100755 --- a/man/summary.pls.Rd +++ b/man/summary.pls.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{summary.pls} \alias{summary.pls} diff --git a/man/summary.plsda.Rd b/man/summary.plsda.Rd index 1da133d..b8bf3a1 100755 --- a/man/summary.plsda.Rd +++ b/man/summary.plsda.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsda.R \name{summary.plsda} \alias{summary.plsda} diff --git a/man/summary.plsdares.Rd b/man/summary.plsdares.Rd index a8714e6..ac42b22 100755 --- a/man/summary.plsdares.Rd +++ b/man/summary.plsdares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsdares.R \name{summary.plsdares} \alias{summary.plsdares} diff --git a/man/summary.plsres.Rd b/man/summary.plsres.Rd index 476e2d0..e2d9609 100755 --- a/man/summary.plsres.Rd +++ b/man/summary.plsres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsres.R \name{summary.plsres} \alias{summary.plsres} diff --git a/man/summary.randtest.Rd b/man/summary.randtest.Rd index 55e567c..22b6bd1 100644 --- a/man/summary.randtest.Rd +++ b/man/summary.randtest.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/randtest.R \name{summary.randtest} \alias{summary.randtest} diff --git a/man/summary.regres.Rd b/man/summary.regres.Rd index b4d21ea..4c0ae20 100755 --- a/man/summary.regres.Rd +++ b/man/summary.regres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regres.R \name{summary.regres} \alias{summary.regres} diff --git a/man/summary.simca.Rd b/man/summary.simca.Rd index 1c1a3e9..d1dfd5d 100755 --- a/man/summary.simca.Rd +++ b/man/summary.simca.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simca.R \name{summary.simca} \alias{summary.simca} diff --git a/man/summary.simcam.Rd b/man/summary.simcam.Rd index aa7f694..bd2b2bd 100755 --- a/man/summary.simcam.Rd +++ b/man/summary.simcam.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcam.R \name{summary.simcam} \alias{summary.simcam} diff --git a/man/summary.simcamres.Rd b/man/summary.simcamres.Rd index 2ef52ec..dd1450d 100755 --- a/man/summary.simcamres.Rd +++ b/man/summary.simcamres.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcamres.R \name{summary.simcamres} \alias{summary.simcamres} diff --git a/man/summary.simcares.Rd b/man/summary.simcares.Rd index 875180f..265cead 100755 --- a/man/summary.simcares.Rd +++ b/man/summary.simcares.Rd @@ -1,4 +1,4 @@ -% Generated by roxygen2 (4.1.1): do not edit by hand +% Generated by roxygen2: do not edit by hand % Please edit documentation in R/simcares.R \name{summary.simcares} \alias{summary.simcares}