2
0
Fork 0
CVE/CVE/man/predict_dim.Rd

58 lines
1.1 KiB
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predict_dim.R
\name{predict_dim}
\alias{predict_dim}
\title{\code{"TODO: @Lukas"}}
\usage{
predict_dim(object, ..., method = "CV")
}
\arguments{
\item{object}{instance of class \code{cve} (result of \code{\link{cve}},
\code{\link{cve.call}}).}
\item{...}{ignored.}
\item{method}{one of \code{"CV"}, \code{"elbow"} or \code{"wilcoxon"}.}
}
\value{
list with \code{"k"} the predicted dimension and method dependent
informatoin.
}
\description{
\code{"TODO: @Lukas"}
}
\section{Method cv}{
TODO: \code{"TODO: @Lukas"}.
}
\section{Method elbow}{
TODO: \code{"TODO: @Lukas"}.
}
\section{Method wilcoxon}{
TODO: \code{"TODO: @Lukas"}.
}
\examples{
# create B for simulation
B <- rep(1, 5) / sqrt(5)
set.seed(21)
# creat predictor data x ~ N(0, I_p)
x <- matrix(rnorm(500), 100)
# simulate response variable
# y = f(B'x) + err
# with f(x1) = x1 and err ~ N(0, 0.25^2)
y <- x \%*\% B + 0.25 * rnorm(100)
# Calculate cve for unknown k between min.dim and max.dim.
cve.obj.simple <- cve(y ~ x)
predict_dim(cve.obj.simple)
}