estimate_network() is deprecated: use build_network() instead. It
passes its arguments to build_network() unchanged and returns what that
returns, after a warning of class deprecatedWarning.
Usage
estimate_network(
data,
method = "relative",
params = list(),
scaling = NULL,
threshold = 0,
level = NULL,
...
)Arguments
- data
The data to estimate from: a data frame of sequences (one row per sequence, one column per position), an event log (one row per event, with
actionset), one-hot code columns, numeric variables (one row per observation) for the association methods, or a square symmetric correlation or covariance matrix. A fittednet_clusteringornet_mmmobject also works: its per-cluster networks are built, with thescaling,threshold,start,endandparamsgiven here, and returned as anetobject_group. The relative networks of anet_mmmare the fitted chains:scalingandthresholdare applied to them, and any other argument raises an error of classnestimate_bad_input.- method
The estimator, as in
build_network(). Default"relative", kept for backward compatibility;build_network()has no default.- params
Settings passed to the estimator, as a named list, such as
list(gamma = 0.5)forglassoorlist(n_gram = 3)forngram. The list is stored on the network, sobootstrap_network()and the other resampling verbs re-estimate with exactly the same settings. The transition methods take tna's sequence optionsweightedandconcat, and the low-levelbegin_state/end_statethatstartandendset.window_size(withwindow_span, orwindowed = TRUEfor a size of 2) countsrelative,frequencyandco_occurrencebetween consecutive non-overlapping blocks of that many positions, astna::tna()does; other transition methods raise an error of classnestimate_bad_input, andmode = "overlapping"a warning of classnestimate_ignored_mode. Column roles given here (action,id,id_col,actor,time,session,order,cols,codes,group) must name existing columns, and must agree with the same role given directly.- scaling
Rescaling applied to the weights after estimation, in the order given:
"minmax"maps the non-zero weights into (0, 1],"max"divides by the largest absolute weight,"rank"replaces the non-zero weights by their ranks, and"normalize"makes each row's absolute weights sum to 1. Zero weights stay zero under every option. Combine them as inc("rank", "minmax"). DefaultNULL(none).- threshold
Weights whose absolute value is below this are set to zero. Default
0(none). Formethod = "mgm","LW"or"none"instead selects mgm's coefficient-thresholding rule (athresholdinparamstakes precedence); any other non-numeric value raises an error.- level
Multilevel decomposition for the undirected association methods (
cor,pcor,glasso,mgm):"between"estimates the network of person means,"within"the network of deviations from them, and"both"returns the two as anetobject_ml. It needs an id column, given asactoror asparams$id; a directed method raises an error. DefaultNULL(no decomposition). Formethod = "mgm", a numeric vector instead gives one category count per modelled variable (1for continuous ones), after group, actor and metadata columns are set aside; it is checked and kept for compatibility, and the fit reads the categories from the data.- ...
Further arguments for
build_network(), such asactor,action,timeorgroup.
Value
A netobject, exactly as build_network() returns it (a
netobject_group or netobject_ml when ... or level asks for one).
Examples
data <- data.frame(T1 = c("x","y","z","x"), T2 = c("y","x","z","y"))
net <- estimate_network(data, method = "relative")
#> Warning: 'estimate_network' is deprecated.
#> Use 'build_network' instead.
#> See help("Deprecated")