SEMID provides a number of methods for testing the global/generic identifiability of mixed graphs.

The only function you're likely to need from SEMID is
`semID`

. A complete description of all package features, along
with examples, can be found at https://github.com/Lucaweihs/SEMID.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | ```
###
# Checking the generic identifiability of parameters in a mixed graph.
###
# Mixed graphs are specified by their directed adjacency matrix L and
# bidirected adjacency matrix O.
L = t(matrix(
c(0, 1, 1, 0, 0,
0, 0, 1, 1, 1,
0, 0, 0, 1, 0,
0, 0, 0, 0, 1,
0, 0, 0, 0, 0), 5, 5))
O = t(matrix(
c(0, 0, 0, 1, 0,
0, 0, 1, 0, 1,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0), 5, 5)); O=O+t(O)
# Create a mixed graph object
graph = MixedGraph(L, O)
# We can plot what this mixed graph looks like, blue edges are directed
# red edges are bidirected.
plot(graph)
# Without using decomposition techniques we can't identify all nodes
# just using the half-trek criterion
htcID(graph, tianDecompose = FALSE)
# The edgewiseTSID function can show that all edges are generically
# identifiable without proprocessing with decomposition techniques
edgewiseTSID(graph, tianDecompose = FALSE)
# The above shows that all edges in the graph are generically identifiable.
# See the help of edgewiseTSID to find out more information about what
# else is returned by edgewiseTSID.
###
# Checking generic parameter identifiability using the generalGenericID
# function
###
L = t(matrix(
c(0, 1, 0, 0, 0,
0, 0, 0, 1, 1,
0, 0, 0, 1, 0,
0, 1, 0, 0, 1,
0, 0, 0, 1, 0), 5, 5))
O = t(matrix(
c(0, 0, 0, 0, 0,
0, 0, 1, 0, 1,
0, 0, 0, 1, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0), 5, 5)); O=O+t(O)
# Create a mixed graph object
graph = MixedGraph(L, O)
# Now lets define an "identification step" function corresponding to
# using the edgewise identification algorithm but with subsets
# controlled by 1.
restrictedEdgewiseIdentifyStep <- function(mixedGraph,
unsolvedParents,
solvedParents,
identifier) {
return(edgewiseIdentifyStep(mixedGraph, unsolvedParents,
solvedParents, identifier,
subsetSizeControl = 1))
}
# Now we run an identification algorithm that iterates between the
# htc and the "restricted" edgewise identification algorithm
generalGenericID(graph, list(htcIdentifyStep,
restrictedEdgewiseIdentifyStep),
tianDecompose = FALSE)
# We can do better (fewer unsolved parents) if we don't restrict the edgewise
# identifier algorithm as much
generalGenericID(graph, list(htcIdentifyStep, edgewiseIdentifyStep),
tianDecompose = FALSE)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.