Simulate data points from the Ultimate Deconvolution model. See ud_fit for the model definition.

simulate_ud_data(n, w, U, V)

Arguments

n

Number of data points to simulate.

w

A numeric vector of length k specifying the prior mixture weights. All entries must be non-negative, but need not sum to 1; the mixture weights are automatically normalized to sum to 1. If not provided, all the mixture weights are set to the same value.

U

A list of length k specifying the covariance matrices in the mixture prior; list element U[[i]] is the m x m covariance matrix for the ith mixture component. For k = 1, U may also be a matrix.

V

The m x m residual covariance matrix. If missing, V is set to the identity matrix.

Value

An n x m matrix in which each row is a draw from the Ultimate Deconvolution model.

See also