|
23 | 23 | # <b2star> <b2starmix> <b2twostar>
|
24 | 24 | # <balance>
|
25 | 25 | # C: <concurrent> <cycle> <ctriple>=<ctriad>
|
26 |
| -# D: <degree> <degreepopularity><density> <dsp> |
| 26 | +# D: <degree> <density> <dsp> |
27 | 27 | # <dyadcov> <degcrossprod> <degcor>
|
28 | 28 | # E: <edgecov> <edges> <esp>
|
29 | 29 | # G: <gwb1degree> <gwb2degree> <gwdegree>
|
30 | 30 | # <gwdsp> <gwesp> <gwidegree>
|
31 | 31 | # <gwnsp> <gwodegree>
|
32 | 32 | # H: <hamming>
|
33 |
| -# I: <idegree> <intransitive> <idegreepopularity> |
| 33 | +# I: <idegree> <intransitive> |
34 | 34 | # <isolates> <istar>
|
35 | 35 | # K: <kstar>
|
36 | 36 | # L: <localtriangle>
|
|
40 | 40 | # <nodemix> <nodeocov> <nodeofactor>
|
41 | 41 | # <nsp>
|
42 | 42 | # O: <odegree> <opentriad> <ostar>
|
43 |
| -# <odegreepopularity> |
44 | 43 | # P: <pdegcor>
|
45 | 44 | # R: <receiver> <rdegcor>
|
46 | 45 | # S: <sender> <simmelian> <simmelianties>
|
@@ -2290,21 +2289,6 @@ InitErgmTerm.degree1.5<-function (nw, arglist, ...) {
|
2290 | 2289 | }
|
2291 | 2290 |
|
2292 | 2291 |
|
2293 |
| -################################################################################ |
2294 |
| -#' @include ergm-deprecated.R |
2295 |
| -#' @describeIn ergm-deprecated Use [`degree1.5`][degree1.5-ergmTerm] instead. |
2296 |
| -InitErgmTerm.degreepopularity<-function (nw, arglist, ...) { |
2297 |
| - .Deprecated("degree1.5") |
2298 |
| - a <- check.ErgmTerm(nw, arglist, directed=FALSE, |
2299 |
| - varnames = NULL, |
2300 |
| - vartypes = NULL, |
2301 |
| - defaultvalues = list(), |
2302 |
| - required = NULL) |
2303 |
| - list(name="degreepopularity", coef.names="degreepopularity", |
2304 |
| - minval=0, maxval=network.dyadcount(nw,FALSE)*sqrt(network.size(nw)-1), conflicts.constraints="degreedist") |
2305 |
| -} |
2306 |
| - |
2307 |
| - |
2308 | 2292 | ################################################################################
|
2309 | 2293 |
|
2310 | 2294 | #' @templateVar name density
|
@@ -2891,101 +2875,6 @@ InitErgmTerm.hamming<-function (nw, arglist, ...) {
|
2891 | 2875 | minval = minval, maxval = maxval)
|
2892 | 2876 | }
|
2893 | 2877 |
|
2894 |
| -################################################################################ |
2895 |
| -#' @rdname ergm-deprecated |
2896 |
| -#' @aliases hammingmix |
2897 |
| -InitErgmTerm.hammingmix<-function (nw, arglist, ..., version=packageVersion("ergm")) { |
2898 |
| - .Deprecate_once(msg="hammingmix() has been deprecated due to disuse.") |
2899 |
| - if(version <= as.package_version("3.9.4")){ |
2900 |
| - # There is no reason hammingmix should be directed-only, but for now |
2901 |
| - # the undirected version does not seem to work properly, so: |
2902 |
| - a <- check.ErgmTerm(nw, arglist, directed=TRUE, |
2903 |
| - varnames = c("attrname","x","base","contrast"), |
2904 |
| - vartypes = c("character","matrix,network","numeric","logical"), |
2905 |
| - defaultvalues = list(NULL,nw,NULL,FALSE), |
2906 |
| - required = c(TRUE,FALSE,FALSE,FALSE), |
2907 |
| - dep.inform = list(FALSE, FALSE, "levels2", FALSE)) |
2908 |
| - attrarg <- a$attrname |
2909 |
| - }else{ |
2910 |
| - # There is no reason hammingmix should be directed-only, but for now |
2911 |
| - # the undirected version does not seem to work properly, so: |
2912 |
| - a <- check.ErgmTerm(nw, arglist, directed=TRUE, |
2913 |
| - varnames = c("attr", "x", "base", "levels", "levels2","contrast"), |
2914 |
| - vartypes = c(ERGM_VATTR_SPEC, "matrix,network", "numeric", ERGM_LEVELS_SPEC, ERGM_LEVELS_SPEC,"logical"), |
2915 |
| - defaultvalues = list(NULL,nw,NULL,NULL,NULL,FALSE), |
2916 |
| - required = c(TRUE,FALSE,FALSE,FALSE,FALSE,FALSE), |
2917 |
| - dep.inform = list(FALSE, FALSE, "levels2", FALSE, FALSE, FALSE)) |
2918 |
| - attrarg <- a$attr |
2919 |
| - } |
2920 |
| - |
2921 |
| - x<-a$x |
2922 |
| - |
2923 |
| - if (a$contrast) { |
2924 |
| - ergm_Init_stop("The 'contrast' argument of the hammingmix term is deprecated. Use 'levels2' instead") |
2925 |
| - } |
2926 |
| - if(is.network(x)){ |
2927 |
| - xm<-as.edgelist(x) |
2928 |
| - x<-paste(quote(x)) |
2929 |
| - }else if(is.character(x)){ |
2930 |
| - xm<-get.network.attribute(nw,x) |
2931 |
| - xm<-as.edgelist(xm) |
2932 |
| - }else{ |
2933 |
| - xm<-as.matrix(x) |
2934 |
| - x<-paste(quote(x)) |
2935 |
| - } |
2936 |
| - if (is.null(xm) || ncol(xm)!=2){ |
2937 |
| - ergm_Init_stop("hammingmix() requires an edgelist") |
2938 |
| - } |
2939 |
| - |
2940 |
| - nodecov <- ergm_get_vattr(attrarg, nw) |
2941 |
| - attrname <- attr(nodecov, "name") |
2942 |
| - |
2943 |
| - u <- ergm_attr_levels(a$levels, nodecov, nw, sort(unique(nodecov))) |
2944 |
| - namescov <- u |
2945 |
| - |
2946 |
| - nr <- length(u) |
2947 |
| - nc <- length(u) |
2948 |
| - |
2949 |
| - levels2.list <- transpose(expand.grid(row = u, col = u, stringsAsFactors=FALSE)) |
2950 |
| - indices2.grid <- expand.grid(row = 1:nr, col = 1:nc) |
2951 |
| - |
2952 |
| - levels2.sel <- if((!hasName(attr(a,"missing"), "levels2") || attr(a,"missing")["levels2"]) && any(NVL(a$base,0)!=0)) levels2.list[-a$base] |
2953 |
| - else ergm_attr_levels(a$levels2, list(row = nodecov, col = nodecov), nw, levels2.list) |
2954 |
| - |
2955 |
| - rows2keep <- match(levels2.sel,levels2.list, NA) |
2956 |
| - rows2keep <- rows2keep[!is.na(rows2keep)] |
2957 |
| - |
2958 |
| - u <- indices2.grid[rows2keep,] |
2959 |
| - |
2960 |
| - nodecov.indices <- match(nodecov, namescov, nomatch=length(namescov) + 1) |
2961 |
| - |
2962 |
| - coef.names <- paste("hammingmix",attrname, |
2963 |
| - apply(matrix(namescov[as.matrix(u)],ncol=2),1,paste,collapse="."), |
2964 |
| - sep=".") |
2965 |
| - # Number of input parameters before covariates equals twice the number |
2966 |
| - # of used matrix cells, namely 2*length(uui), |
2967 |
| - inputs=c(to_ergm_Cdouble(xm, prototype=nw), u[,1], u[,2], nodecov.indices) |
2968 |
| - attr(inputs, "ParamsBeforeCov") <- nrow(u) |
2969 |
| - # The emptynwstats code below does not work right for |
2970 |
| - # undirected networks, mostly since hammingmix doesn't work |
2971 |
| - # in this case anyway. |
2972 |
| - nw %v% "_tmp_nodecov" <- as.vector(nodecov) |
2973 |
| - if(version <= as.package_version("3.9.4")){ |
2974 |
| - emptynwstats <- summary(nw ~ nodemix("_tmp_nodecov", base=a$base)) |
2975 |
| - }else{ |
2976 |
| - nodemix.call <- c(list(as.name("nodemix"),"_tmp_nodecov"), list(base=a$base, levels=a$levels, levels2=a$levels2)[!attr(a,"missing")[c("base","levels","levels2")]]) |
2977 |
| - nodemix.call <- as.call(nodemix.call) |
2978 |
| - nodemix.form <- as.formula(call("~", nw, nodemix.call)) |
2979 |
| - emptynwstats <- summary(nodemix.form) |
2980 |
| - } |
2981 |
| - list(name="hammingmix", coef.names=coef.names, inputs=inputs, |
2982 |
| - emptynwstats=emptynwstats, dependence=FALSE) |
2983 |
| -} |
2984 |
| - |
2985 |
| - |
2986 |
| - |
2987 |
| - |
2988 |
| - |
2989 | 2878 |
|
2990 | 2879 | #=======================InitErgmTerm functions: I============================#
|
2991 | 2880 |
|
@@ -3074,21 +2963,6 @@ InitErgmTerm.idegree1.5<-function (nw, arglist, ...) {
|
3074 | 2963 | }
|
3075 | 2964 |
|
3076 | 2965 |
|
3077 |
| -################################################################################ |
3078 |
| -#' @describeIn ergm-deprecated Use [`idegree1.5`][idegree1.5-ergmTerm] instead. |
3079 |
| -InitErgmTerm.idegreepopularity<-function (nw, arglist, ...) { |
3080 |
| - .Deprecated("idegree1.5") |
3081 |
| - a <- check.ErgmTerm(nw, arglist, directed=TRUE, |
3082 |
| - varnames = NULL, |
3083 |
| - vartypes = NULL, |
3084 |
| - defaultvalues = list(), |
3085 |
| - required = NULL) |
3086 |
| - list(name="idegreepopularity", coef.names="idegreepopularity", |
3087 |
| - minval=0, maxval=network.dyadcount(nw,FALSE)*sqrt(network.size(nw)-1), conflicts.constraints="idegreedist") |
3088 |
| -} |
3089 |
| - |
3090 |
| - |
3091 |
| - |
3092 | 2966 | ################################################################################
|
3093 | 2967 |
|
3094 | 2968 | #' @templateVar name intransitive
|
@@ -4528,20 +4402,6 @@ InitErgmTerm.odegree1.5<-function (nw, arglist, ...) {
|
4528 | 4402 | }
|
4529 | 4403 |
|
4530 | 4404 |
|
4531 |
| -################################################################################ |
4532 |
| -#' @describeIn ergm-deprecated Use [`odegree1.5`][odegree1.5-ergmTerm] instead. |
4533 |
| -InitErgmTerm.odegreepopularity<-function (nw, arglist, ...) { |
4534 |
| - .Deprecated("odegree1.5") |
4535 |
| - a <- check.ErgmTerm(nw, arglist, directed=TRUE, |
4536 |
| - varnames = NULL, |
4537 |
| - vartypes = NULL, |
4538 |
| - defaultvalues = list(), |
4539 |
| - required = NULL) |
4540 |
| - list(name="odegreepopularity", coef.names="odegreepopularity", |
4541 |
| - minval=0, maxval=network.dyadcount(nw,FALSE)*sqrt(network.size(nw)-1), conflicts.constraints="odegreedist") |
4542 |
| -} |
4543 |
| - |
4544 |
| - |
4545 | 4405 | ################################################################################
|
4546 | 4406 |
|
4547 | 4407 | #' @templateVar name opentriad
|
|
0 commit comments