Description Usage Arguments Value
tdpca
tailors the choice of principal components to keep when detection
of changepoints in the mean vector or covariance matrix is the aim.
It extends tpca
by allowing the input to be a covariance matrix
of a Hankel matrix (a data matrix with lagged variables stacked on top of
eachother), and thus incorporate time dynamics.
Note that the dimension for the change distribution is the dimension of
the data without lagged variables.
See the documentation for tpca
for more information.
1 2 3 |
cov_mat |
A covariance matrix of lagged variables. Must be positive definite. |
lag |
The number of lags used. |
change_distr |
A string or a change distribution object. A string can be
used to choose among a set of already implemented distributions:
'full_uniform', 'mean_only', 'sd_only', 'cor_only'. Custom change
distributions can be specified by using the |
divergence |
A string specifying which divergence metric to use. Available options: 'normal_hellinger', 'normal_KL' and 'normal_bhat'. |
cutoff |
A numeric between 0 and 1 governing how many principal axes to retain. |
max_axes |
An integer indicating the maximum number of axes that should be returned regardless of what the cutoff is. |
n_sim |
An integer specifying the number of simulation runs. |
tpca
returns an S3 object of class "tpca". This is a list with
the following components:
axes
A matrix with the chosen principal axes as rows, ordered in decreasing order of sensitivity.
which_axes
A vector indicating which principal axes that were chosen in decreasing order of sensitivity.
prop_axes_max
A vector with the proportion of simulations each axis was the most sensitive one.
divergence_sim
A matrix containing all the simulated draws from the divergence metric along each principal axis. It is of dimension data_dim x n_sim.
change_type
A character vector indicating the type of change for each iteration of the simulation.
change_sparsity
A numeric vector indicating the sparsity of the change for each iteration of the simulation.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.