2
0
Fork 0

fix: some smaller change in the docs

This commit is contained in:
Daniel Kapla 2020-02-26 13:44:53 +01:00
parent 377b3503ab
commit 4696620363
7 changed files with 29 additions and 28 deletions

View File

@ -5,8 +5,8 @@ directions <- function(object, k, ...) {
#' Computes projected training data \code{X} for given dimension `k`. #' Computes projected training data \code{X} for given dimension `k`.
#' #'
#' Returns \eqn{B'X}. That is the dimensional design matrix \eqn{X} on the #' Returns \eqn{B'X}. That is, it computes the projection of the \eqn{n x p}
#' columnspace of the cve-estimate for given dimension \eqn{k}. #' design matrix \eqn{X} on the column space of \eqn{B} of dimension \eqn{k}.
#' #'
#' @param object an object of class \code{"cve"}, usually, a result of a call to #' @param object an object of class \code{"cve"}, usually, a result of a call to
#' \code{\link{cve}} or \code{\link{cve.call}}. #' \code{\link{cve}} or \code{\link{cve.call}}.

View File

@ -37,7 +37,6 @@
#' # calculate cve with method 'simple' for k = 1 #' # calculate cve with method 'simple' for k = 1
#' set.seed(21) #' set.seed(21)
#' cve.obj.simple <- cve(y ~ x, k = k) #' cve.obj.simple <- cve(y ~ x, k = k)
#' print(cve.obj.simple$res$'1'$h)
#' print(estimate.bandwidth(x, k = k)) #' print(estimate.bandwidth(x, k = k))
#' @export #' @export
estimate.bandwidth <- function (X, k, nObs, version = 1L) { estimate.bandwidth <- function (X, k, nObs, version = 1L) {

View File

@ -2,9 +2,9 @@
#' #'
#' Boxplots of the output \code{L} from \code{\link{cve}} over \code{k} from #' Boxplots of the output \code{L} from \code{\link{cve}} over \code{k} from
#' \code{min.dim} to \code{max.dim}. For given \code{k}, \code{L} corresponds #' \code{min.dim} to \code{max.dim}. For given \code{k}, \code{L} corresponds
#' to \eqn{L_n(V, X_i)} where \eqn{V} is a stiefel manifold element as #' to \eqn{L_n(V, X_i)} where \eqn{V} is the minimizer of \eqn{L_n(V)} where
#' minimizer of #' \eqn{V} is an element of a Stiefel manifold (see
#' \eqn{L_n(V)}, for further details see Fertl, L. and Bura, E. (2019). #' Fertl, L. and Bura, E. (2019)).
#' #'
#' @param x an object of class \code{"cve"}, usually, a result of a call to #' @param x an object of class \code{"cve"}, usually, a result of a call to
#' \code{\link{cve}} or \code{\link{cve.call}}. #' \code{\link{cve}} or \code{\link{cve.call}}.

View File

@ -1,7 +1,7 @@
#' Predict method for CVE Fits. #' Predict method for CVE Fits.
#' #'
#' Predict response using projected data \eqn{B'C} by fitting #' Predict response using projected data. The forward model \eqn{g(B' X)} is
#' \eqn{g(B'C) + \epsilon} using \code{\link{mars}}. #' estimated with \code{\link{mars}} in the \code{\pkg{mda}} package.
#' #'
#' @param object an object of class \code{"cve"}, usually, a result of a call to #' @param object an object of class \code{"cve"}, usually, a result of a call to
#' \code{\link{cve}} or \code{\link{cve.call}}. #' \code{\link{cve}} or \code{\link{cve.call}}.
@ -9,7 +9,7 @@
#' @param k dimension of SDR space to be used for data projection. #' @param k dimension of SDR space to be used for data projection.
#' @param ... further arguments passed to \code{\link{mars}}. #' @param ... further arguments passed to \code{\link{mars}}.
#' #'
#' @return prediced response at \code{newdata}. #' @return prediced respone(s) for \code{newdata}.
#' #'
#' @examples #' @examples
#' # create B for simulation #' # create B for simulation

View File

@ -122,31 +122,32 @@ predict_dim_wilcoxon <- function(object, p.value = 0.05) {
)) ))
} }
#' Estimate Dimension of Reduction Space. #' Estimate Dimension of the Sufficient Reduction.
#' #'
#' This function estimates the dimension of the mean dimension reduction space, #' This function estimates the dimension, i.e. the rank of \eqn{B}. The default
#' i.e. number of columns of \eqn{B} matrix. The default method \code{'CV'} #' method \code{'CV'} performs leave-one-out (LOO) cross-validation using
#' performs l.o.o cross-validation using \code{mars}. Given #' \code{mars} as follows for \code{k = min.dim, ..., max.dim} a
#' \code{k = min.dim, ..., max.dim} a cross-validation via \code{mars} is #' cross-validation via \code{mars} is
#' performed on the dataset \eqn{(Y_i, B_k' X_i)_{i = 1, ..., n}} where #' performed on the dataset \eqn{(Y_i, B_k' X_i)_{i = 1, ..., n}} where
#' \eqn{B_k} is the \eqn{p \times k}{p x k} dimensional CVE estimate. The #' \eqn{B_k} is the \eqn{p \times k}{p x k} dimensional CVE estimate. The
#' estimated SDR dimension is the \eqn{k} where the #' estimated SDR dimension is the \eqn{k} where the
#' cross-validation mean squared error is minimal. The method \code{'elbow'} #' cross-validation mean squared error is minimal. The method \code{'elbow'}
#' estimates the dimension via \eqn{k = argmin_k L_n(V_{p - k})} where #' estimates the dimension via \eqn{k = argmin_k L_n(V_{p - k})} where
#' \eqn{V_{p - k}} is space that is orthogonal to the columns-space of the CVE estimate of \eqn{B_k}. Method \code{'wilcoxon'} is similar to \code{'elbow'} #' \eqn{V_{p - k}} is the space that is orthogonal to the column space of the
#' but finds the minimum using the wilcoxon-test. #' CVE estimate of \eqn{B_k}. Method \code{'wilcoxon'} finds the minimum using
#' the Wilcoxon test.
#' #'
#' @param object an object of class \code{"cve"}, usually, a result of a call to #' @param object an object of class \code{"cve"}, usually, a result of a call to
#' \code{\link{cve}} or \code{\link{cve.call}}. #' \code{\link{cve}} or \code{\link{cve.call}}.
#' @param method This parameter specify which method will be used in dimension #' @param method This parameter specifies which method is used in dimension
#' estimation. It provides three methods \code{'CV'} (default), \code{'elbow'}, #' estimation. It provides three options: \code{'CV'} (default),
#' and \code{'wilcoxon'} to estimate the dimension of the SDR. #' \code{'elbow'} and \code{'wilcoxon'}.
#' @param ... ignored. #' @param ... ignored.
#' #'
#' @return list with #' @return A \code{list} with
#' \describe{ #' \describe{
#' \item{}{cretirion of method for \code{k = min.dim, ..., max.dim}.} #' \item{}{criterion for method and \code{k = min.dim, ..., max.dim}.}
#' \item{k}{estimated dimension as argmin over \eqn{k} of criterion.} #' \item{k}{estimated dimension is the minimizer of the criterion.}
#' } #' }
#' #'
#' @examples #' @examples

View File

@ -1,7 +1,6 @@
#' Prints a summary of a \code{cve} result. #' Prints summary statistics of the \eqn{L} \code{cve} component.
#' #'
#' Prints a summary statistics of output \code{L} from \code{cve} for #' Prints a summary statistics of the \code{L} component of a \code{cve} object #' for \code{k = min.dim, ..., max.dim}.
#' \code{k = min.dim, ..., max.dim}.
#' #'
#' @param object an object of class \code{"cve"}, usually, a result of a call to #' @param object an object of class \code{"cve"}, usually, a result of a call to
#' \code{\link{cve}} or \code{\link{cve.call}}. #' \code{\link{cve}} or \code{\link{cve.call}}.

View File

@ -1,11 +1,13 @@
#' Draws a sample from the invariant measure on the Stiefel manifold #' Random sample from Stiefel manifold.
#'
#' Draws a random sample from the invariant measure on the Stiefel manifold
#' \eqn{S(p, q)}. #' \eqn{S(p, q)}.
#' #'
#' @param p row dimension #' @param p row dimension
#' @param q col dimension #' @param q col dimension
#' @return \eqn{p \times q}{p x q} semi-orthogonal matrix. #' @return A \eqn{p \times q}{p x q} semi-orthogonal matrix.
#' @examples #' @examples
#' V <- rStiefel(6, 4) #' V <- rStiefel(6, 4)
#' @export #' @export
rStiefel <- function(p, q) { rStiefel <- function(p, q) {
return(qr.Q(qr(matrix(rnorm(p * q, 0, 1), p, q)))) return(qr.Q(qr(matrix(rnorm(p * q, 0, 1), p, q))))