2019-09-16 09:15:51 +00:00
|
|
|
% Generated by roxygen2: do not edit by hand
|
|
|
|
% Please edit documentation in R/CVE.R
|
|
|
|
\name{cve}
|
|
|
|
\alias{cve}
|
|
|
|
\alias{cve.call}
|
2019-10-18 07:06:36 +00:00
|
|
|
\title{Conditional Variance Estimator (CVE).}
|
2019-09-16 09:15:51 +00:00
|
|
|
\usage{
|
2019-09-25 12:49:12 +00:00
|
|
|
cve(formula, data, method = "simple", max.dim = 10L, ...)
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-09-25 12:49:12 +00:00
|
|
|
cve.call(X, Y, method = "simple", nObs = sqrt(nrow(X)), h = NULL,
|
|
|
|
min.dim = 1L, max.dim = 10L, k = NULL, tau = 1, tol = 0.001,
|
|
|
|
epochs = 50L, attempts = 10L, logger = NULL)
|
2019-09-16 09:15:51 +00:00
|
|
|
}
|
|
|
|
\arguments{
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{formula}{an object of class \code{"formula"} which is a symbolic
|
|
|
|
description of the model to be fitted.}
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{data}{an optional data frame, containing the data for the formula if
|
|
|
|
supplied.}
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{method}{specifies the CVE method variation as one of
|
2019-09-16 09:15:51 +00:00
|
|
|
\itemize{
|
2019-10-18 07:06:36 +00:00
|
|
|
\item "simple" exact implementation as describet in the paper listed
|
|
|
|
below.
|
|
|
|
\item "weighted" variation with addaptive weighting of slices.
|
2019-09-16 09:15:51 +00:00
|
|
|
}}
|
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{max.dim}{upper bounds for \code{k}, (ignored if \code{k} is supplied).}
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{...}{Parameters passed on to \code{cve.call}.}
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{X}{data matrix with samples in its rows.}
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{Y}{Responces (1 dimensional).}
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{nObs}{parameter for choosing bandwidth \code{h} using
|
|
|
|
\code{\link{estimate.bandwidth}} (ignored if \code{h} is supplied).}
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{min.dim}{lower bounds for \code{k}, (ignored if \code{k} is supplied).}
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
\item{k}{Dimension of lower dimensional projection, if given only the
|
|
|
|
specified dimension is estimated.}
|
|
|
|
|
|
|
|
\item{tau}{Initial step-size.}
|
|
|
|
|
|
|
|
\item{tol}{Tolerance for break condition.}
|
|
|
|
|
|
|
|
\item{epochs}{maximum number of optimization steps.}
|
|
|
|
|
|
|
|
\item{attempts}{number of arbitrary different starting points.}
|
|
|
|
|
|
|
|
\item{logger}{a logger function (only for addvanced user).}
|
2019-09-16 09:15:51 +00:00
|
|
|
}
|
|
|
|
\description{
|
2019-10-18 07:06:36 +00:00
|
|
|
TODO: reuse of package description and details!!!!
|
2019-09-16 09:15:51 +00:00
|
|
|
}
|
|
|
|
\examples{
|
|
|
|
library(CVE)
|
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
# create dataset
|
|
|
|
n <- 200
|
|
|
|
p <- 12
|
|
|
|
X <- matrix(rnorm(n * p), n, p)
|
|
|
|
B <- cbind(c(1, rep(0, p - 1)), c(0, 1, rep(0, p - 2)))
|
|
|
|
Y <- X \%*\% B
|
|
|
|
Y <- Y[, 1L]^2 + Y[, 2L]^2 + rnorm(n, 0, 0.3)
|
2019-09-16 09:15:51 +00:00
|
|
|
|
2019-10-18 07:06:36 +00:00
|
|
|
# Call the CVE method.
|
|
|
|
dr <- cve(Y ~ X)
|
|
|
|
round(dr[[2]]$B, 1)
|
2019-09-16 09:15:51 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
\seealso{
|
2019-10-18 07:06:36 +00:00
|
|
|
For a detailed description of the formula parameter see
|
|
|
|
[\code{\link{formula}}].
|
2019-09-16 09:15:51 +00:00
|
|
|
}
|