View source: R/calculate-sna-pars.R
For details, see 'get_S_from_matrix()'. Difference is that this functions takes an 3d-array, where each slice is an matrix of observed association, e.g. for permuted networks. Can use parallization, which is highly recommended.
1 2 3 4 5 6 7 8 9 | get_S_from_array(
i_j_sum,
i_j_together_array,
initial.values = c(0.5, 0.5),
lower = c(0.01, 0.01),
upper = c(1, 10),
use.parallel = FALSE,
cores = 1
)
|
i_j_sum |
Matrix with values i_j_sum[ij] used as denominator of the estimated association index (d in the Whitehead paper) |
i_j_together_array |
Array with matrices with values i_j_together[ij] number of observations of individuals i and j together (x in the Whitehead paper) |
initial.values |
Initial values for the parameters to be optimized over ('par' argument in 'optim“) |
lower |
lower bounds for parameters |
upper |
upper bounds for parameters |
use.parallel |
TRUE/FALSE |
cores |
Number of cores to be used for parallization |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.