diff --git a/DESCRIPTION b/DESCRIPTION index 349f4b5ad..f6c5e8951 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: ergm -Version: 4.6-7278 +Version: 4.6-7282 Date: 2023-12-09 Title: Fit, Simulate and Diagnose Exponential-Family Models for Networks Authors@R: c( diff --git a/R/ergm-defunct.R b/R/ergm-defunct.R index 3b2f29dfc..6fc84c33e 100644 --- a/R/ergm-defunct.R +++ b/R/ergm-defunct.R @@ -11,108 +11,136 @@ #' @name ergm-defunct #' @title Functions that have been removed from this package +#' @usage +#' +#' robust.inverse(...) +#' +#' plot.network.ergm(...) +#' +#' ergm.getterms(...) +#' +#' plot.mcmc.list.ergm(...) +#' +#' plot.ergm(...) +#' +#' summary.statistics(...) +#' +#' ergm.checkargs(...) +#' +#' ergm.checkbipartite(...) +#' +#' ergm.checkdirected(...) +#' +#' summary.gof(...) +#' +#' ergm.getMCMCsample(...) +#' +#' ergm.MHP.table(...) +#' +#' MHproposal(...) +#' +#' MHproposal.character(...) +#' +#' MHproposal.ergm(...) +#' +#' MHproposal.formula(...) +#' +#' ergm.init.methods(...) +#' +#' ergm.ConstraintImplications(...) +#' +#' ergm.mcmcslave(...) +#' +#' ergm.update.formula(...) +#' +#' remove.offset.formula(...) +#' +#' network.update(...) +#' +#' ergm.getmodel(...) +#' +#' ergm.getglobalstats(...) +#' +#' as.edgelist.compressed(...) +#' +#' as.network.uncompressed(...) +#' +#' standardize.network(...) +#' +#' newnw.extract(...) +#' +#' san.ergm(...) +#' +#' is.inCH(...) +#' +#' as.rlebdm.ergm(...) +#' #' @description Functions that have been removed after a period of deprecation. #' @param ... Arguments to defunct functions. +#' @details +#' `robust.inverse()`: use `MASS::ginv()`. +#' +#' `plot.network.ergm()`: use `latentnet::plot.ergmm()`. +#' +#' `ergm.getterms()`: use `statnet.common::list_rhs.formula()` and `statnet.common::eval_lhs.formula()`. +#' +#' `plot.mcmc.list.ergm()`: use `ergm_plot.mcmc.list()`. +#' +#' `plot.ergm()`: use `mcmc.diagnostics()`. +#' +#' `summary.statistics()`: use `summary_formula()`. +#' +#' `ergm.checkargs()`: use `check.ErgmTerm()`. +#' +#' `ergm.checkbipartite()`: use `check.ErgmTerm()`. +#' +#' `ergm.checkdirected()`: use `check.ErgmTerm()`. +#' +#' `summary.gof()`: use `print.gof()`. +#' +#' `ergm.getMCMCsample()`: use `ergm_MCMC_sample()`. +#' +#' `ergm.MHP.table()`: use `ergm_proposal_table()`. +#' +#' `MHproposal()`: use `ergm_proposal()`. +#' +#' `MHproposal.character()`: use `ergm_proposal()`. +#' +#' `MHproposal.ergm()`: use `ergm_proposal()`. +#' +#' `MHproposal.formula()`: use `ergm_proposal()`. +#' +#' `ergm.init.methods()`: Initial methods are now specified in `InitErgmReference.*()` functions. +#' +#' `ergm.ConstraintImplications()`: Implications are now specified in the `InitErgmConstraint.*()` functions. +#' +#' `ergm.mcmcslave()`: use `ergm_MCMC_slave()`. +#' +#' `ergm.update.formula()`: use `statnet.common::nonsimp_update.formula()`. +#' +#' `remove.offset.formula()`: use `statnet.common::filter_rhs.formula()`. +#' +#' `network.update()`: use `update.network()`. +#' +#' `ergm.getmodel()`: use `ergm_model()`. +#' +#' `ergm.getglobalstats()`: use `summary.ergm_model()`. +#' +#' `as.edgelist.compressed()`: no longer used +#' +#' `as.network.uncompressed()`: no longer used +#' +#' `standardize.network()`: obviated by improvements to `network` package. +#' +#' `newnw.extract()`: use `ergm_state` "API" +#' +#' `san.ergm()`: removed due to no meaningful use case +#' +#' `is.inCH()`: use `shrink_into_CH()`. +#' +#' `as.rlebdm.ergm()`: no longer used +#' +#' @aliases robust.inverse plot.network.ergm ergm.getterms plot.mcmc.list.ergm plot.ergm summary.statistics ergm.checkargs ergm.checkbipartite ergm.checkdirected summary.gof ergm.getMCMCsample ergm.MHP.table MHproposal MHproposal.character MHproposal.ergm MHproposal.formula ergm.init.methods ergm.ConstraintImplications ergm.mcmcslave ergm.update.formula remove.offset.formula network.update ergm.getmodel ergm.getglobalstats as.edgelist.compressed as.network.uncompressed standardize.network newnw.extract san.ergm is.inCH as.rlebdm.ergm +#' #' @keywords internal - NULL - -# The following were defunct-ed on 2018-04-07. - -#' @rdname ergm-defunct -robust.inverse <- function (...) .Defunct("MASS::ginv") - -# The following were defunct-ed on 2019-03-07. -#' @rdname ergm-defunct -plot.network.ergm <- function(...) .Defunct("latentnet::plot.ergmm()") - -#' @rdname ergm-defunct -ergm.getterms<-function(...) .Defunct("statnet.common::list_rhs.formula() and statnet.common::eval_lhs.formula()") - -#' @rdname ergm-defunct -plot.mcmc.list.ergm <- function(...) .Defunct("ergm_plot.mcmc.list()") - -#' @rdname ergm-defunct -plot.ergm <- function(...) .Defunct("mcmc.diagnostics(x,...)") - -#' @rdname ergm-defunct -summary.statistics <- function(...) .Defunct("summary_formula()") - -#' @rdname ergm-defunct -ergm.checkargs <- function(...) .Defunct("check.ErgmTerm") - -#' @rdname ergm-defunct -ergm.checkbipartite <- function(...) .Defunct("check.ErgmTerm") - -#' @rdname ergm-defunct -ergm.checkdirected <- function(...) .Defunct("check.ErgmTerm") - -#' @rdname ergm-defunct -summary.gof <- function(...) .Defunct("print.gof") - -#' @rdname ergm-defunct -ergm.getMCMCsample <- function(...) .Defunct("ergm_MCMC_sample") - -#' @rdname ergm-defunct -ergm.MHP.table <- function(...) .Defunct("ergm_proposal_table()") - -#' @rdname ergm-defunct -MHproposal <- function(...) .Defunct("ergm_proposal()") - -#' @rdname ergm-defunct -MHproposal.character <- function(...) .Defunct("ergm_proposal()") - -#' @rdname ergm-defunct -MHproposal.ergm <- function(...) .Defunct("ergm_proposal()") - -#' @rdname ergm-defunct -MHproposal.formula <- function(...) .Defunct("ergm_proposal()") - -#' @rdname ergm-defunct -ergm.init.methods <- function(...) .Defunct(msg="Function ergm.init.methods() has been deprecated in favor of specifying init_methods in InitErgmReference.*() functions, and has no effect.") - -#' @rdname ergm-defunct -ergm.ConstraintImplications <- function(...) .Defunct(msg="Function ergm.ConstraintImplications() has been deprecated in favor of specifying the implications in the InitErgmConstraint.*() functions, and has no effect.") - -#' @rdname ergm-defunct -ergm.mcmcslave <- function(...) .Defunct("ergm_MCMC_slave") - -# The following were defunct-ed on 2019-08-21. - -#' @rdname ergm-defunct -ergm.update.formula <- function(...) .Defunct("statnet.common::nonsimp_update.formula") - -#' @rdname ergm-defunct -remove.offset.formula <- function(...) .Defunct("statnet.common::filter_rhs.formula") - -#' @rdname ergm-defunct -network.update<-function(...) .Defunct("update.network") - -#' @rdname ergm-defunct -ergm.getmodel <- function(...) .Defunct("ergm_model") - -#' @rdname ergm-defunct -ergm.getglobalstats <- function(...) .Defunct("summary.ergm_model") - -#' @rdname ergm-defunct -as.edgelist.compressed<-function(...) .Defunct(msg="No longer used.") - -#' @rdname ergm-defunct -as.network.uncompressed<-function(...) .Defunct(msg="No longer used.") - -# The following were defunct-ed 2020-09-25. - -#' @rdname ergm-defunct -standardize.network <- function(...) .Defunct(msg=paste0("Obviated by improvements to ", sQuote("network"), " package.")) - -#' @rdname ergm-defunct -newnw.extract<-function(...) .Defunct('ergm_state "API"') - -# The following were defunct-ed 2022-06-21. - -#' @rdname ergm-defunct -san.ergm <- function(...) .Defunct(msg="Removed due to no meaningful use case.") - -# The following were defunct-ed 2022-09-10. -#' @rdname ergm-defunct -is.inCH <- function(...) .Defunct("shrink_into_CH") diff --git a/R/logLik.ergm.R b/R/logLik.ergm.R index 42c6779e3..445988c29 100644 --- a/R/logLik.ergm.R +++ b/R/logLik.ergm.R @@ -201,10 +201,9 @@ nobs.ergm <- function(object, ...){ warning("The number of observed dyads in this network is ill-defined due to complex constraints on the sample space. Disable this warning with ",sQuote("options(ergm.loglik.warn_dyads=FALSE)"),".") } - # TODO: Remove the as.rlebdm() approach at the same time as as.rlebdm.ergm(). NVL3(NVL(object$mple.null.lik, object$mple.lik, object$null.lik, object$mle.lik), attr(.,"nobs"), - NVL(object$info$n_info_dyads, sum(as.rlebdm(object, which="informative")))) + object$info$n_info_dyads) } NO_NULL_IMPLICATION <- "This means that all likelihood-based inference (LRT, Analysis of Deviance, AIC, BIC, etc.) is only valid between models with the same reference distribution and constraints." diff --git a/R/rlebdm.R b/R/rlebdm.R index 7509b4787..a65313892 100644 --- a/R/rlebdm.R +++ b/R/rlebdm.R @@ -277,11 +277,6 @@ compress.rlebdm <- function(x, ...){ structure(y, n=attr(x, "n"), class=class(x)) } -# TODO: Remove this after the next release. -as.rlebdm.ergm <- function(x, ...){ - as.rlebdm(x$constrained, x$constrained.obs, ...) -} - #' @describeIn rlebdm #' #' Convert an [`rlebdm`] object to an [`edgelist`]: a two-column diff --git a/man/ergm-defunct.Rd b/man/ergm-defunct.Rd index f27d1478f..288f6397e 100644 --- a/man/ergm-defunct.Rd +++ b/man/ergm-defunct.Rd @@ -32,19 +32,20 @@ \alias{newnw.extract} \alias{san.ergm} \alias{is.inCH} +\alias{as.rlebdm.ergm} \title{Functions that have been removed from this package} \usage{ robust.inverse(...) -\method{plot}{network.ergm}(...) +plot.network.ergm(...) ergm.getterms(...) -\method{plot}{mcmc.list.ergm}(...) +plot.mcmc.list.ergm(...) -\method{plot}{ergm}(...) +plot.ergm(...) -\method{summary}{statistics}(...) +summary.statistics(...) ergm.checkargs(...) @@ -52,7 +53,7 @@ ergm.checkbipartite(...) ergm.checkdirected(...) -\method{summary}{gof}(...) +summary.gof(...) ergm.getMCMCsample(...) @@ -82,17 +83,19 @@ ergm.getmodel(...) ergm.getglobalstats(...) -\method{as.edgelist}{compressed}(...) +as.edgelist.compressed(...) -\method{as.network}{uncompressed}(...) +as.network.uncompressed(...) standardize.network(...) newnw.extract(...) -\method{san}{ergm}(...) +san.ergm(...) is.inCH(...) + +as.rlebdm.ergm(...) } \arguments{ \item{...}{Arguments to defunct functions.} @@ -100,4 +103,67 @@ is.inCH(...) \description{ Functions that have been removed after a period of deprecation. } +\details{ +\code{robust.inverse()}: use \code{MASS::ginv()}. + +\code{plot.network.ergm()}: use \code{latentnet::plot.ergmm()}. + +\code{ergm.getterms()}: use \code{statnet.common::list_rhs.formula()} and \code{statnet.common::eval_lhs.formula()}. + +\code{plot.mcmc.list.ergm()}: use \code{ergm_plot.mcmc.list()}. + +\code{plot.ergm()}: use \code{mcmc.diagnostics()}. + +\code{summary.statistics()}: use \code{summary_formula()}. + +\code{ergm.checkargs()}: use \code{check.ErgmTerm()}. + +\code{ergm.checkbipartite()}: use \code{check.ErgmTerm()}. + +\code{ergm.checkdirected()}: use \code{check.ErgmTerm()}. + +\code{summary.gof()}: use \code{print.gof()}. + +\code{ergm.getMCMCsample()}: use \code{ergm_MCMC_sample()}. + +\code{ergm.MHP.table()}: use \code{ergm_proposal_table()}. + +\code{MHproposal()}: use \code{ergm_proposal()}. + +\code{MHproposal.character()}: use \code{ergm_proposal()}. + +\code{MHproposal.ergm()}: use \code{ergm_proposal()}. + +\code{MHproposal.formula()}: use \code{ergm_proposal()}. + +\code{ergm.init.methods()}: Initial methods are now specified in \verb{InitErgmReference.*()} functions. + +\code{ergm.ConstraintImplications()}: Implications are now specified in the \verb{InitErgmConstraint.*()} functions. + +\code{ergm.mcmcslave()}: use \code{ergm_MCMC_slave()}. + +\code{ergm.update.formula()}: use \code{statnet.common::nonsimp_update.formula()}. + +\code{remove.offset.formula()}: use \code{statnet.common::filter_rhs.formula()}. + +\code{network.update()}: use \code{update.network()}. + +\code{ergm.getmodel()}: use \code{ergm_model()}. + +\code{ergm.getglobalstats()}: use \code{summary.ergm_model()}. + +\code{as.edgelist.compressed()}: no longer used + +\code{as.network.uncompressed()}: no longer used + +\code{standardize.network()}: obviated by improvements to \code{network} package. + +\code{newnw.extract()}: use \code{ergm_state} "API" + +\code{san.ergm()}: removed due to no meaningful use case + +\code{is.inCH()}: use \code{shrink_into_CH()}. + +\code{as.rlebdm.ergm()}: no longer used +} \keyword{internal}