ghype.Rd
ghype is used to fit gHypEG models when the propensity matrix is known. It can be used to estimate a null model (soft configuration model), or the benchmark 'full-model', where the propensity matrix is fitted such that the expected graph from the fitted model is the one passed to the function.
ghype(
graph,
directed,
selfloops,
xi = NULL,
omega = NULL,
unbiased = FALSE,
regular = FALSE,
...
)
# S3 method for matrix
ghype(
graph,
directed,
selfloops,
xi = NULL,
omega = NULL,
unbiased = FALSE,
regular = FALSE,
...
)
# S3 method for default
ghype(
graph,
directed,
selfloops,
xi = NULL,
omega = NULL,
unbiased = FALSE,
regular = FALSE,
...
)
# S3 method for igraph
ghype(
graph,
directed,
selfloops,
xi = NULL,
omega = NULL,
unbiased = FALSE,
regular = FALSE,
...
)
# S3 method for ghype
print(x, suppressCall = FALSE, ...)
either an adjacency matrix or an igraph graph.
a boolean argument specifying whether graph is directed or not.
a boolean argument specifying whether the model should incorporate selfloops.
an optional matrix defining the combinatorial matrix of the model.
an optional matrix defining the propensity matrix of the model.
a boolean argument specifying whether to model the hypergeometric ensemble (no propensity), defaults to FALSE.
a boolean argument specifying whether to model the 'gnp' ensemble (no xi), defaults to FALSE.
further arguments passed to or from other methods.
ghype model
boolean, suppress print of the call
ghype return an object of class "ghype".
ghype(matrix)
: Fitting ghype models from an adjacency matrix
ghype(default)
: Generating a ghype model from given xi and omega
ghype(igraph)
: Fitting ghype models from an igraph graph
print(ghype)
: Print method for ghype object.
data("adj_karate")
fullmodel <- ghype(graph = adj_karate, directed = FALSE, selfloops = FALSE, unbiased = FALSE)
data('adj_karate')
model <- scm(adj_karate, FALSE, FALSE)
print(model)
#> Call:
#> ghype.matrix(graph = graph, directed = directed, selfloops = selfloops,
#> unbiased = TRUE, regular = FALSE)
#> ghype undirected , no selfloops
#> 34 vertices, 231 edges
#> Loglikelihood:
#> -434.5449
#> df: 34