Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
^\.github$
^\.git$
^checkEffects.R$
^checkTheEffects.R$
^checkEffects*.out$
^ONEWS$
^ONEWS_gh$
^README.md$
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ inst/doc
autom4te.cache
config.log
config.status
checkTheEffects.R
checkEffects*.out
docs/*
!docs/manual/
docs/manual/Older/
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Encoding: UTF-8
Package: RSiena
Type: Package
Title: Siena - Simulation Investigation for Empirical Network Analysis
Version: 1.6.8
Date: 2026-06-06
Version: 1.6.9
Date: 2026-06-10
Authors@R: c(person("Tom A.B.", "Snijders", role = c("aut", "ctb"), comment = c(ORCID = "0000-0003-3157-4157")),
person("Ruth M.", "Ripley", role = "aut"),
person("Krists", "Boitmanis", role = c( "aut","ctb")),
Expand Down
18 changes: 17 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
2026-06-10

# RSiena 1.6.9

## Changes in RSiena:
### Functionality
* `print.sienaGroup` now also specifies the node sets for covariates
and restricts printed line lengths to 64.
* Use of `r` in `estimate_onestep` effectuated.
* `checkEffects.R` corrected so that it will run without errors
and can be used for batch checking (will take a long time).
### Bug correction
* `make_specification` corrected for a continuous dependent behavior variable
and for two dependent networks and varying actor covariates (`effects.r`).
* Use of `prevAns` with one-step estimator corrected (`initializeFRAN.r`).

2026-06-06

# RSiena 1.6.8
Expand All @@ -7,7 +23,7 @@
* Selection of effects for combinations of two dependent networks
and an actor covariate improved, which leads to including
more effects for combinations where one of the dependent networks
is bipartite.
is bipartite (`effects.r`, `effectsDocumentation.r`).
### Functionality
* New function `estimate_onestep`.
* Option `onestep` for `update_theta.sienaEffects` changed.
Expand Down
18 changes: 9 additions & 9 deletions R/effects.r
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,7 @@ getEffects <- function(x, nintn = 10, behNintn=4, getDocumentation=FALSE, onePer
}
for (k in seq(along=xx$depvars))
{
if ((types[k] %in% c('behavior', 'continuous')) &&
(attr(xx$depvars[[k]], 'nodeSet') == nodeSet))
if (types[k] %in% c('behavior', 'continuous'))
{
objEffects <-
rbind(objEffects,
Expand Down Expand Up @@ -1214,7 +1213,7 @@ getEffects <- function(x, nintn = 10, behNintn=4, getDocumentation=FALSE, onePer
covarname=names(xx$vCovars)[k],
nodeSets, # this is attr(depvar, 'nodeSet')
attr(xx$depvars[[j]], 'nodeSet'),
attr(xx$cCovars[[k]], 'nodeSet'),
attr(xx$vCovars[[k]], 'nodeSet'),
name=varname))
}
for (k in seq(along = xx$dycCovars))
Expand Down Expand Up @@ -1247,15 +1246,16 @@ getEffects <- function(x, nintn = 10, behNintn=4, getDocumentation=FALSE, onePer
}
for (k in seq(along=xx$depvars))
{
if (types[k] %in% c('behavior', 'continuous') &&
attr(xx$depvars[[k]], 'nodeSet') == nodeSets[1])
if (types[k] %in% c('behavior', 'continuous'))
{
objEffects <-
rbind(objEffects,
createEffects("covarABipNetObjective", otherName,
names(xx$depvars)[k], name=varname,
groupName=groupName, group=group,
netType=netType))
covarNetNetEff(otherName,
covarname=names(xx$depvars)[k],
nodeSets, # this is attr(depvar, 'nodeSet')
attr(xx$depvars[[j]], 'nodeSet'),
attr(xx$depvars[[k]], 'nodeSet'),
name=varname))
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions R/initializeFRAN.r
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ initializeFRAN <- function(z, x, data, effects, prevAns=NULL, initC,
if (x$useOneStep)
{
keepStill <- which(prevAns$fixed)
if (length(keepStill == 0))
if (length(keepStill) == 0)
{
keepStill <- 0
}
Expand Down Expand Up @@ -2153,7 +2153,7 @@ update_theta.sienaEffects <- function(x, prevAns, varName=NULL,
eff <- updateTheta(x, prevAns=prevAns, varName=varName)
if (onestep)
{
est_onestep <- estimate_onestep(prevAns, fixed=keepUnchanged)
est_onestep <- estimate_onestep(prevAns, fixed=keepUnchanged, r=r)
effsF <- prevAns$requestedEffects
requested <- which(names(prevAns$requestedEffects)=="requested")
effsF$initialValue <- est_onestep
Expand Down
81 changes: 43 additions & 38 deletions R/sienaprint.r
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,39 @@
## * even if these main effects were not requested.
## *
## ****************************************************************************/

##@printWithLineMax for print.siena; prints character strings
printWithLineMax <- function(heading, contents, contentkinds){
# function to print contents with categories contentkinds
# with a heading; line length maximum 4 + 60
# heading is a character string,
# contents and contentkinds are characters strings of the same length
if (length(contents) != length(contentkinds))
{
stop("Error in printWithLineMax: contents and contentkinds have different length")
}
vsets <- unique(contentkinds)
for (vk in vsets)
{
cat(heading, "<", vk, "> : \n")
contentk <- contents[contentkinds==vk]
cumlength <- 0
cat(" ")
for (k in seq_along(contentk))
{
cumlength <- cumlength + nchar(contentk[k])
if (cumlength > 60)
{
cat("\n ")
cumlength <- 0
}
cat(contentk[k])
if (k < length(contentk)){cat(", ")}
}
cat("\n")
}
cat("\n")
}
##@print.sienadata Methods
print.sienadata <- function(x, ...)
{
Expand Down Expand Up @@ -51,38 +84,6 @@ print.sienadata <- function(x, ...)
}
}
}
##@printWithLineMax internal print.siena; prints character strings
printWithLineMax <- function(heading, contents, contentkinds){
# function to print contents with categories contentkinds
# with a heading; line length maximum 4 + 60
# heading is a character string,
# contents and contentkinds are characters strings of the same length
if (length(contents) != length(contentkinds))
{
stop("Error in printWithLineMax: contents and contentkinds have different length")
}
vsets <- unique(contentkinds)
for (vk in vsets)
{
cat(heading, "<", vk, "> : \n")
contentk <- contents[contentkinds==vk]
cumlength <- 0
cat(" ")
for (k in seq_along(contentk))
{
cumlength <- cumlength + nchar(contentk[k])
if (cumlength > 60)
{
cat("\n ")
cumlength <- 0
}
cat(contentk[k])
if (k < length(contentk)){cat(", ")}
}
cat("\n")
}
cat("\n")
}
# begin main method siena.print proper
if ((!inherits(x, "sienadata")) & (!inherits(x, "siena")))
{
Expand Down Expand Up @@ -243,16 +244,20 @@ print.sienaGroup <- function(x, ...)
cat('Dependent variables: \n')
cat(paste(att$netnames, ":", att$types,'\n'))
cat('Total number of groups:', length(x),'\n')
cat('Total number of periods:', att$observations,'\n')
cat('Total number of periods:', att$observations,'\n')
if (length(x[[1]]$vCovars) > 0)
{
cat('Changing covariates: ',
paste(names(x[[1]]$vCovars), collapse = ", "), "\n")
}
vnodesets <- sapply(x[[1]]$vCovars, function(v){attr(v,"nodeSet")})
printWithLineMax("Changing covariates for node set", names(x[[1]]$vCovars), vnodesets)
}
if (length(x[[1]]$dyvCovars) > 0)
{
cat('Changing dyadic covariates: ',
paste(names(x[[1]]$dyvCovars), collapse=", "), "\n")
kindNodeSets <- rep("", length(x[[1]]$dyvCovars))
for (k in seq_along(x[[1]]$dyvCovars))
{
kindNodeSets[k] <- paste(attr(x[[1]]$dyvCovars[[k]],"nodeSet"), collapse=", ")
}
printWithLineMax("Changing dyadic covariates for node sets", names(x[[1]]$dyvCovars), kindNodeSets)
}
cat("\n")
invisible(x)
Expand Down
Loading
Loading