subspaceDataGeneration: Data Generation - Subspace

Description Usage Arguments Details Value References See Also Examples

View source: R/dataGeneration.R

Description

Allows for easy generation of data that lies in a latent subspace with changepoints in the subspace.

Usage

1
2
3
4
5
6
7
8
9
subspaceDataGeneration(
  n,
  p,
  subspaceDim,
  tau = c(1, n),
  nvar = 0.05,
  svar = 1,
  changeSize = 0.5 * sqrt(subspaceDim)
)

Arguments

n

Number of time points.

p

Dimension of the time series.

subspaceDim

Dimension of the latent subspace.

tau

Vector of changepoint locations.

nvar

Variance of measurement error i.e the variance of the points in the directions of the orthogonal compliment of the subspace (assumed to be Normal).

svar

Variance within the subspace i.e. the variance of points in directions of the basis of the subspace (assumed to be Normal).

changeSize

Either scalar for change size of all the changepoints or a vector (of equal length to the number of changepoints) indicating the change size for each changepoint. All change sizes must be between 0 and sqrt(subspaceDim).

Details

This function allows for the creation of a data matrix that contains changes in subspaces as described in \insertCiteGrundy2020;textualchangepoint.cov. The creation of the data set starts by generating a random initial basis for the first segment. Subsequent subspace basis are then created that are the required change size from the previous subspace basis. svar is then the variance of the points in the directions of the subspace bases and nvar is the variance of the points in the directions orthogonal to these subspace bases. Hence, nvar must be less then svar for the subspace to be visible. The change size is defined in terms of the F-distance between subspace bases as described in \insertCiteGrundy2020;textualchangepoint.cov.

Value

List with elements:

References

\insertRef

Grundy2020changepoint.cov

See Also

cptSubspace, wishartDataGeneration

Examples

1
2
3
4
5
6
set.seed(1)
dataObject <- subspaceDataGeneration(n=100,p=4,subspaceDim=2,tau=40)
dim(dataObject$data)
dataObject$cpts
dataObject$changeSize
dataObject$subspace

grundy95/changepoint.cov documentation built on April 5, 2021, 6:21 p.m.