| Rmad | R Documentation |
Rmad(Rpop, MAD = .10, tries = 1E5, SEED = NULL)
Rmad(Rpop, MAD = 0.03, tries = 1e+05, SEED = NULL)
Rpop |
(matrix) A model-implied, population correlation matrix. |
MAD |
(scalar) The desired mean absolute deviation value (i.e.,
|
tries |
(scalar) The maximum number of tries for the optimization algorithm.
Default( |
SEED |
(numeric) The starting seed for the random number generator. If SEED is not supplied then the program will generate (and return) a randomly generated seed. |
R A random R matrix with a known MAD from Rpop.
Rpop The model-implied, population correlation matrix.
Delta The vector of model-errors.
H A hollow matrix used to create a fungible R matrix.
iter Iteration number at convergence (or max iteration number).
MAD The target mean absolute deviation.
converged. A Boolean that describes the convergence status of the optimization algorithm.
SEED The initial value for the random number generator.
Niels Waller
# Example 1
Rpop <- matrix(.35, 6, 6)
diag(Rpop) <- 1
out <- Rmad(Rpop, MAD = .038, SEED = 123)
out$R |> round(3)
# E = mattix of model error values
E = Rpop - out$R
mean(abs(E[lower.tri(E, diag = FALSE)]))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.