You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: R/InitErgmConstraint.R
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -58,8 +58,8 @@
58
58
## n <- network.size(lhs.nw)
59
59
## storage.mode(n) <- "integer"
60
60
## a <- c(ergm_get_vattr(attr, lhs.nw)) # Strip attributes, which confuse rle().
61
-
## if(NVL(lhs.nw%n%"bipartite",0)){
62
-
## bip <- lhs.nw %n% "bipartite"
61
+
## if(NVL(lhs.b1.size(nw),0)){
62
+
## bip <- lhs.b1.size(nw)
63
63
## ea <- a[seq_len(bip)]
64
64
## aa <- a[bip+seq_len(n-bip)]
65
65
## if(length(rle(ea)$lengths)!=length(unique(rle(ea)$values)) || length(rle(aa)$lengths)!=length(unique(rle(aa)$values))) stop("Current implementation of block-diagonal sampling requires that the blocks of the egos and the alters be contiguous. See ", sQuote("ergmConstraint?blockdiag"), " for more information.")
#' @param same optional argument. If passed the name of a vertex attribute,
1052
+
#' only mutual pairs that match on the attribute are counted. Only one of `same`
1053
+
#' or `by` may be used. If both parameters are passed, `same` takes precedent. This
1054
+
#' parameter is affected by `diff`.
1055
+
#' @param diff separate counts for each unique matching value can be obtained by using
1056
+
#' `diff=TRUE` with `same`.
1057
+
#' @param by each node is counted separately for each mutual pair in which it
1058
+
#' occurs and the counts are tabulated by unique values of the attribute if
1059
+
#' passed the name of a vertex attribute. This means that the sum of the mutual statistics when `by` is used
1060
+
#' will equal twice the standard mutual statistic. Only one of `same`
1061
+
#' or `by` may be used. If both parameters are passed, `same` takes precedent. This
1062
+
#' parameter is not affected by `diff`.
1063
+
#' @param keep a numerical vector to specify which statistics should be kept whenever the `mutual` term would
1064
+
#' ordinarily result in multiple statistics.
1065
+
#' @templateVar Ls.howmany one or two
1066
+
#' @templateVar Ls.interp . If given, the statistic will count the number of dyads where a tie in `Ls[[1]]` reciprocates a tie in `Ls[[2]]` and vice versa. (Note that dyad that has mutual ties in `Ls[[1]]` and in `Ls[[2]]` will add 2 to this statistic.) If a formula is given, it is replicated.
0 commit comments