Used to obtain an estimate of the correlation matrix after transforming the initial data.
Arguments
- obj
S3 class object of type
simdesign
(or inheriting from it).- n_obs
Number of observations to simulate.
- cor_type
Can be either a character (
pearson
,spearman
,kendall
) which is passed tostats::cor
or a function, which is directly used to compute the correlation matrix on the simulated data. Such a function is expected to take a single input matrix (and possibly other arguments which can be set via...
) and output a single matrix.- seed
Random number seed. NULL does not change the current seed.
- ...
Further arguments are passed to the function that computes the correlation matrix (either
stats::cor
or the user provided function).
Value
A numeric matrix given by the pairwise correlation coefficients for each
pair of variables defined by obj
and computed according to cor_type
.
Details
This function is useful to estimate the final correlation of the data after transformation of the initial data. To provide a robust estimate it is advised to use a very large number of observations to compute the correlation matrix.