Description Usage Arguments Details Value See Also Examples
This function creates N samples from a multivariate normal distribution with mean equal to zero and pairwise-correlation rho.
1 | sample_mvn(nvar, rho, N, seed = 0)
|
nvar |
An integer specifying the dimension of the multivariate normal distribution. |
rho |
The correlation matrix, if a single number is given then the correlation is assumed to be constant between all of the variable. |
N |
An integer specifying the number of samples. |
seed |
The seed used to generate that data set.seed. |
This is a basic functions that samples a standard normal and uses the Choleski decomposition to create correlated samples.
samples.mvn A matrix of dimensions equal to (nvar, N) containing the samples from a MVN.
Other data generating functions: MAAR_mechanism_noindep
,
MAAR_mechanism
,
MANAR_mechanism
,
logistic_prob
1 | sample_mvn(5, 0.3, 100)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.