Skip to content

Commit e258a49

Browse files
authored
Merge pull request #113 from stocnet/develop
RSiena version 1.4.23
2 parents 121bb80 + 1edacfc commit e258a49

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2314
-527
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ Encoding: UTF-8
22
Package: RSiena
33
Type: Package
44
Title: Siena - Simulation Investigation for Empirical Network Analysis
5-
Version: 1.4.22
6-
Date: 2025-02-08
5+
Version: 1.4.23
6+
Date: 2025-05-03
77
Authors@R: c(person("Tom A.B.", "Snijders", role = c("cre", "aut"), email = "tom.snijders@nuffield.ox.ac.uk",
88
comment = c(ORCID = "0000-0003-3157-4157")),
99
person("Ruth M.", "Ripley", role = "aut"),

NEWS.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# RSiena 1.4.23
2+
3+
2025-05-03
4+
5+
## Changes in RSiena:
6+
### Bug corrections
7+
* Repaired (hopefully) memory leak in `getTargetActorStatistics` and
8+
`getTargetsChangeContributions` in `siena07setup.cpp`.
9+
* Repaired (hopefully) memory leak in `move` in `MLSimulation.cpp`.
10+
* Repaired memory leak in `DoubleCovariateCatFunction`.
11+
### Effects
12+
* New effects `fromAny`, `sameInXCycle4`.
13+
* Effect shortName `cycle4ND` replaced by `cycle4`.
14+
* Better treatment of missing covariate values in effect `sameXCycle4`.
15+
* Internal effect parameter values 3 and 4 for `sameXInPop`,`diffXInPop`,
16+
`sameXInPopIntn`, `sameXInActIntn`, `homXOutAct2`.
17+
* New C++ class `CatCovariateDependentNetworkEffect` (for `homXOutAct2`).
18+
* Added `(#)` to the `effectName` of `from`, `sameXInPop`, `diffXInPop`,
19+
`sameXVInPop`, `sameXVInPop2`.
20+
### New functionality
21+
* In `print.sienaEffects(..., includeShortNames=TRUE)`, the `effectNumber`
22+
is also printed.
23+
### Coding
24+
* Class `Covariate` has new variable `covariateN`, which then is transferred
25+
as `covarN` to `CovariateDependentNetworkEffect` and
26+
`DoubleCovariateFunction`.
27+
### Changes in documentation:
28+
* Definition of effects `outRateLog`, `inRateLog`, and `recipRateLog`
29+
corrected in the manual.
30+
131
# RSiena 1.4.22
232

333
2025-02-08

R/effects.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ getEffects <- function(x, nintn = 10, behNintn=4, getDocumentation=FALSE, onePer
14111411
covObjEffects[covObjEffects$shortName %in%
14121412
c("altX", "altSqX", "altLThresholdX", "altRThresholdX",
14131413
"homXOutAct", "homXOutAct2", "altXOutAct",
1414-
"inActX", "outActX"), ]
1414+
"inActX", "outActX", "sameInXCycle4"), ]
14151415
if (!tr & (!moreThan2))
14161416
{
14171417
covObjEffects <-

R/effectsMethods.r

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ print.sienaEffects <- function(x, fileName=NULL, includeOnly=TRUE,
5050
timeDummies <- !x$timeDummy[x$include] == ","
5151
if (includeShortNames)
5252
{
53-
specs <- as.data.frame(x[, c("name", "effectName", "shortName", "include", "fix",
54-
"test", "initialValue", "parm")])
53+
specs <- as.data.frame(x[, c("effectNumber", "name", "effectName",
54+
"shortName", "include", "fix",
55+
"test", "initialValue", "parm")])
5556
}
5657
else
5758
{
@@ -77,7 +78,8 @@ print.sienaEffects <- function(x, fileName=NULL, includeOnly=TRUE,
7778
}
7879
if (nDependents == 1)
7980
{
80-
specs <- specs[, -1] # drop name of dependent variable
81+
whichname <- which(names(specs)=="name")
82+
specs <- specs[, -whichname] # drop name of dependent variable
8183
}
8284
if (any(endowments))
8385
{

R/sienaRI.r

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ sienaRI <- function(data, ans=NULL, theta=NULL, algorithm=NULL, effects=NULL,
4545
contributions <- getChangeContributions(algorithm = ans$x, data = data,
4646
effects = ans$effects)
4747
# contributions[[1]] is periods by effects by actors by actors
48+
#cat("a\n")
49+
#browser()
4850
RI <- expectedRelativeImportance(conts = contributions,
4951
effects = ans$effects, theta =ans$theta, thedata=data,
5052
getChangeStatistics=getChangeStats)
@@ -157,6 +159,9 @@ getChangeContributions <- function(algorithm, data, effects)
157159
for(i in 1:length(myeffectsOrder)){
158160
myeffects[[i]]<-tmpeffects[[myeffectsOrder[i]]]
159161
}
162+
#cat("e\n") #Hier gaat hij fout.
163+
# Voor returnStaticChangeContributions=TRUE gaat het wel goed.
164+
#browser()
160165
ans <- .Call(C_getTargets, PACKAGE=pkgname, pData, pModel, myeffects,
161166
parallelrun=TRUE, returnActorStatistics=FALSE,
162167
returnStaticChangeContributions=TRUE)
@@ -282,6 +287,9 @@ message('\nNote that for symmetric networks, effect sizes are for modelType 2 (f
282287
cdec <- array(cdec, dim=c(1,dim(cdec)))
283288
}
284289
##
290+
291+
#cat("b\n")
292+
#browser()
285293
rownames(cdec) <- effectNa[currentDepEffs]
286294
if (getChangeStatistics)
287295
{

R/sienaeffects.r

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ includeEffects <- function(myeff, ..., include=TRUE, name=myeff$name[1],
4242
{
4343
stop("Effect AltsAvAlt now is called avXAlt. Use the new name please.")
4444
}
45+
if ("cycle4ND" %in% effectNames)
46+
{
47+
stop("Effect cycle4ND now is called cycle4. Use the new name please.")
48+
}
4549
use <- myeff$shortName %in% effectNames &
4650
myeff$type==type &
4751
myeff$name==name &
@@ -265,7 +269,6 @@ includeInteraction <- function(myeff, ...,
265269
intn[effect3] <- TRUE
266270
}
267271
myeff2 <- myeff[intn,]
268-
myeff2$effectName <- paste(which(intn), myeff2$effectName)
269272
print.sienaEffects(myeff2, includeOnly=FALSE, includeRandoms=random,
270273
includeShortNames=TRUE)
271274
}

0 commit comments

Comments
 (0)