Description Usage Arguments Details Value Note See Also Examples
The function uses the lower and upper correlation bounds from results of the
function valid_input_cormat
to test the users' input correlation
matrix.
1 | check_input_cormat(invcdfnames, paramslists, cor_matrix)
|
invcdfnames |
A character sequence of the marginals' inverse cdf names. |
paramslists |
A list contains lists of params of the marginals as the same order as invcdfnames, the names of the arguments of the inner lists should keep the same with the function arguments matching rules with the arguments of invcdfnames functions. |
cor_matrix |
The input correlation matrix to be checked. |
The function uses the lower and upper correlation bounds from results of the
function valid_input_cormat
to test the users' input correlation
matrix. If all the elements in the input correlation matrix are in the bounds,
the function will return TRUE
, otherwise it will print out the elements'
positions in the input correlation matrix which are out of the lower and upper
bounds.
If all the elements of the input correlation matrix all in the bounds the function
will return TRUE
, otherwise it will print messages about the out of bounds #'elements' positions and then give an error message to users.
Because of the random samples, the results of the function may be a little different each time.
BoundingRA
, valid_input_cormat
,
gennortaRA
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
invcdfnames <- c("qt","qpois","qnorm")
paramslists <- list(
m1 = list(df = 3),
m2 = list(lambda = 5),
m3 = list(mean = 0, sd = 1)
)
cor_matrix_correct <- matrix(c(1,0.5,-0.3,0.5,1,0.4,-0.3,0.4,1), 3)
cor_matrix_wrong <- matrix(c(1,0.94,-0.3,0.94,1,0.4,-0.3,0.4,1), 3)
check_input_cormat(invcdfnames, paramslists, cor_matrix_correct)
check_input_cormat(invcdfnames, paramslists, cor_matrix_wrong)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.