View source: R/simulation_models.R
simulation_model5 | R Documentation |
This models generates shape outliers with a different covariance structure from that of the main model. The main model is of the form:
X_i(t) = \mu t + e_i(t),
contamination model of the form:
X_i(t) = \mu t + \tilde{e}_i(t),
where t\in [0,1]
, and e_i(t)
and \tilde{e}_i(t)
are Gaussian processes with zero mean and
covariance function of the form:
\gamma(s,t) = \alpha\exp(-\beta|t-s|^\nu)
Please see the simulation models vignette with
vignette("simulation_models", package = "fdaoutlier")
for more details.
simulation_model5(
n = 100,
p = 50,
outlier_rate = 0.05,
mu = 4,
cov_alpha = 1,
cov_beta = 1,
cov_nu = 1,
cov_alpha2 = 5,
cov_beta2 = 2,
cov_nu2 = 0.5,
deterministic = TRUE,
seed = NULL,
plot = F,
plot_title = "Simulation Model 5",
title_cex = 1.5,
show_legend = T,
ylabel = "",
xlabel = "gridpoints"
)
n |
The number of curves to generate. Set to |
p |
The number of evaluation points of the curves. Curves are usually generated
over the interval |
outlier_rate |
A value between |
mu |
The mean value of the functions. Set to |
cov_alpha, cov_alpha2 |
A value indicating the coefficient of the exponential function
of the covariance matrix, i.e., the |
cov_beta, cov_beta2 |
A value indicating the coefficient of the terms inside the exponential
function of the covariance matrix, i.e., the |
cov_nu, cov_nu2 |
A value indicating the power to which to raise the terms inside the exponential
function of the covariance matrix, i.e., the |
deterministic |
A logical value. If |
seed |
A seed to set for reproducibility. |
plot |
A logical value indicating whether to plot data. |
plot_title |
Title of plot if |
title_cex |
Numerical value indicating the size of the plot title relative to the device default.
Set to 1.5 by default. Ignored if |
show_legend |
A logical indicating whether to add legend to plot if |
ylabel |
The label of the y-axis. Set to |
xlabel |
The label of the x-axis if |
A list containing:
data |
a matrix of size |
true_outliers |
a vector of integers indicating the row index of the outliers in the generated data. |
dt <- simulation_model5(plot = TRUE)
dt$true_outliers
dim(dt$data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.