Skip to content

Commit 6947a37

Browse files
authored
Merge pull request #311 from stocnet/develop
v1.5.7
2 parents 13b2944 + 1409977 commit 6947a37

6 files changed

Lines changed: 46 additions & 9 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: migraph
22
Title: Inferential Methods for Multimodal and Other Networks
3-
Version: 1.5.6
4-
Date: 2025-11-19
3+
Version: 1.5.7
4+
Date: 2026-02-18
55
Description: A set of tools for testing networks.
66
It includes functions for univariate and multivariate
77
conditional uniform graph and quadratic assignment procedure testing,

NAMESPACE

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
S3method(glance,ergm)
44
S3method(glance,netlm)
55
S3method(glance,netlogit)
6+
S3method(glance,sienaFit)
67
S3method(predict,netlm)
78
S3method(predict,netlogit)
89
S3method(print,diffs_model)
9-
S3method(print,ergm)
1010
S3method(print,netlm)
1111
S3method(print,netlogit)
1212
S3method(print,network_test)
1313
S3method(print,over_memb)
1414
S3method(summary,diffs_model)
15+
S3method(summary,ergm)
16+
S3method(summary,sienaFit)
1517
S3method(tidy,ergm)
1618
S3method(tidy,netlm)
1719
S3method(tidy,netlogit)
20+
S3method(tidy,sienaFit)
1821
export("%>%")
1922
export(glance)
2023
export(net_regression)

NEWS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# migraph 1.5.7
2+
3+
2026-02-18
4+
5+
- Using fict_marvel in tests
6+
- Added tidy(), glance(), and summary() methods for sienaFit class objects
7+
- Added summary.ergm()
8+
19
# migraph 1.5.6
210

311
2025-11-19

R/class_models.R

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ tidy.ergm <- function(
9797
dplyr::as_tibble(ret)
9898
}
9999

100+
#' @method tidy sienaFit
101+
#' @export
102+
tidy.sienaFit <- function(ans){
103+
tibble::tibble(
104+
dv = ans$effects$name,
105+
term = ans$effects$effectName,
106+
estimate = ans$theta,
107+
se = ans$se,
108+
tstat = ans$theta/ans$se
109+
)
110+
}
100111

101112
#' @importFrom generics glance
102113
#' @export
@@ -239,6 +250,15 @@ glance.ergm <- function(x, deviance = FALSE, mcmc = FALSE, ...) {
239250
ret
240251
}
241252

253+
#' @method glance sienaFit
254+
#' @export
255+
glance.sienaFit <- function(ans){
256+
tibble::tibble(
257+
tmax = ans$tmax,
258+
tconv.max = ans$tconv.max[,1]
259+
)
260+
}
261+
242262
#' @export
243263
print.netlm <- function(x, ...){
244264
cat("# Fitted model results\n")
@@ -256,7 +276,15 @@ print.netlogit <- function(x, ...){
256276
}
257277

258278
#' @export
259-
print.ergm <- function(x, ...){
279+
summary.ergm <- function(x, ...){
280+
cat("# Fitted model results\n")
281+
print(tidy(x))
282+
cat("\n# Model summary statistics\n")
283+
print(glance(x))
284+
}
285+
286+
#' @export
287+
summary.sienaFit <- function(x, ...){
260288
cat("# Fitted model results\n")
261289
print(tidy(x))
262290
cat("\n# Model summary statistics\n")

cran-comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@
99

1010
0 errors | 0 warnings | 0 notes
1111

12-
- Fixed CRAN errors
12+
- This release is required to avoid a reverse dependency issue because of renaming some data in the manynet package

tests/testthat/test-model_tests.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# # Making sure the tests family of functions works as intended.
2-
marvel_friends <- manynet::to_giant(manynet::to_unsigned(manynet::ison_marvel_relationships)) %>%
2+
marvel_friends <- manynet::to_uniplex(manynet::fict_marvel, "relationship") %>%
3+
manynet::to_giant() %>% manynet::to_unsigned() %>%
34
manynet::to_subgraph(PowerOrigin == "Human")
45
cugtest <- test_random(marvel_friends,
56
manynet::net_heterophily,
@@ -38,9 +39,6 @@ test_that("test_random works", {
3839
})
3940

4041
# Set the qaptest up
41-
marvel_friends <- manynet::to_unsigned(manynet::ison_marvel_relationships)
42-
marvel_friends <- manynet::to_giant(marvel_friends)
43-
marvel_friends <- manynet::to_subgraph(marvel_friends, PowerOrigin == "Human")
4442
qaptest <- test_permutation(marvel_friends,
4543
manynet::net_heterophily,
4644
attribute = "Attractive",

0 commit comments

Comments
 (0)