qap_run | R Documentation |
qap_run
).The qap_run
function is a wrapper around sna
's Quadratic Assignment Procedure models sna::netlm
and sna::netlogit
. It expects a networks objects containing dependent and independent variables of interest. It is required to use the output from qap_setup
.
qap_run(
net,
dependent = NULL,
variables,
directed = FALSE,
family = "linear",
reps = 500
)
net |
An |
dependent |
A string naming the dependent variable of interest. By default, the probability of a tie. Can also be the output of |
variables |
A vector of strings naming the independent variables of interest. Must be the output of |
directed |
A logical statement identifying if the network should be treated as directed. Defaults to |
family |
A string identifying the functional form. Options are |
reps |
A numeric value indicating the number of draws. Defaults to 500. |
'qap_run' returns a list of elements that include:
- covs_df
, a data frame containing term labels, estimates, standard errors and p-values
- mods_df
, a data frame containing model-level information including the number of observations, AIC and BIC statistics.
flor <- netwrite(nodelist = florentine_nodes,
node_id = "id",
i_elements = florentine_edges$source,
j_elements = florentine_edges$target,
type = florentine_edges$type,
directed = FALSE,
net_name = "florentine_graph")
flor_setup <- qap_setup(flor$florentine_graph,
variables = c("total_degree"),
methods = c("difference"))
flor_qap <- qap_run(flor_setup$graph,
variables = c("diff_total_degree"))
# Inspect results
flor_qap$covs_df
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.