Checks and converts the partial matrix and graph given for a HR graphical model.
Arguments
- M
A partial matrix or a vector of entries corresponding to the edges of
graph
- graph
A graph object or
NULL
if the graph structure is implied by theNA
structure ofM
- graph_type
Passed to
check_graph()
.
Value
A list consisting of
matrix
The matrix given as input or implied by the input
graph
The graph given as input or implied by the input
Throws an error if the input is not valid.
See also
Other input validation functions:
checkGamma()
,
check_graph()
,
ensure_matrix_symmetry()