| pcop | R Documentation |
Computes a principal curve as defined in Delicado and Huerta (2003) \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/s001800300145")}.
pcop(x, Ch = 1.5, Cd = 0.3, plot.true = FALSE, ...)
x |
A finite numeric matrix or data frame of |
Ch |
The smoothing parameter |
Cd |
The distance between two consecutive principal oriented points in a
PCOP is about |
plot.true |
If |
... |
Additional parameters passed to |
A list with two elements:
Data frame storing the principal curve of oriented points in
the original format, with columns param, dens,
span, orth.var, pop1, pop2, ...,
pr.dir1, pr.dir2, ...
List conforming to the format used in princurve; see that package for details.
List of algorithm parameters used for the fit.
Input row and column names, if present. Other input attributes are not used by the algorithm and are not propagated.
Matched function call.
n <- 500
p <- 3
x <- matrix(rnorm(n * p), ncol = p) %*% diag(p:1)
pcop(x, plot.true = FALSE)
x <- runif(100, -1, 1)
x <- cbind(x, x ^ 2 + rnorm(100, sd = 0.1))
pcop(x, plot.true = FALSE)
if (interactive()) {
pcop(x, plot.true = TRUE, lwd = 4, col = 2)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.