graph.param.estimator {statGraph} | R Documentation |
Graph Parameter Estimator
Description
graph.param.estimator
estimates the parameter that best approximates
the model to the observed graph according to the Graph Information Criterion
(GIC).
Usage
graph.param.estimator(
Graph,
model,
interval = NULL,
eps = 0.01,
search = "grid",
...
)
Arguments
Graph |
the undirected graph (igraph object).
If |
model |
either a string or a function: A string that indicates one of the following models: 'ER' (Erdos-Renyi random graph), 'GRG' (geometric random graph), 'KR' (k regular random graph), 'WS' (Watts-Strogatz model), and 'BA' (Barabási-Albert model). A function that returns a graph (represented by its adjacency matrix) generated by a graph model. It must contain two arguments: the first one corresponds to the graph size and the second to the parameter of the model. |
interval |
numeric vector containing the values that will be
considered for the parameter estimation, or a list containing 'lo' and 'hi'
that indicates the model's parameter search interval < 0 to 1 with step 0 to sqrt(2) with step 0 to 'n' with step 0 to 1 with step and 0 to 3 with step |
eps |
precision of the grid and ternary search (default is |
search |
string that indicates the search algorithm to find the parameter with the smallest GIC. If 'grid' (default) parameter is estimated using grid search, and only works when method is not 'fast'. If 'ternary' parameter is estimated using ternary search. |
... |
Other relevant parameters for |
Value
A list with class 'statGraph' containing the following components:
method: |
a string indicating the used method. |
info: |
a string showing details about the method. |
data.name: |
a string with the data's name(s). |
param: |
the parameter estimate. For the 'ER', 'GRG', 'KR', 'WS', and 'BA'
models, the parameter corresponds to the probability to connect a pair of
vertices, the radius used to construct the geometric graph in a unit square,
the degree |
dist: |
the distance between the observed graph and the graph model with the estimated parameter. |
References
Takahashi, D. Y., Sato, J. R., Ferreira, C. E. and Fujita A. (2012) Discriminating Different Classes of Biological Networks by Analyzing the Graph Spectra Distribution. _PLoS ONE_, *7*, e49949. doi:10.1371/journal.pone.0049949.
Silverman, B. W. (1986) _Density Estimation_. London: Chapman and Hall.
Sturges, H. A. The Choice of a Class Interval. _J. Am. Statist. Assoc._, *21*, 65-66.
Sheather, S. J. and Jones, M. C. (1991). A reliable data-based bandwidth selection method for kernel density estimation. _Journal of the Royal Statistical Society series B_, 53, 683-690. http://www.jstor.org/stable/2345597.
Examples
set.seed(1)
G <- igraph::sample_gnp(n=50, p=0.5)
# Using a string to indicate the graph model
result1 <- graph.param.estimator(G, 'ER', eps=0.25)
result1
# Using a function to describe the graph model
# Erdos-Renyi graph
set.seed(1)
model <- function(n, p) {
return(igraph::sample_gnp(n, p))
}
result2 <- graph.param.estimator(G, model, seq(0.2, 0.8, 0.1))
result2