Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update url addresses to new orga and solve some issues #88

Merged
merged 40 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9303d18
Add initial simulation code and lifecycle dependency
auzaheta Jun 22, 2022
56d6ace
WIP Refactor simulation functions
auzaheta Jun 28, 2022
3361fb3
Merge develop branch
auzaheta Aug 17, 2022
ecf2778
WIP gather
auzaheta Aug 17, 2022
adfccf7
Export `GatherPreprocessing()`, refactor initial value intercept rate…
auzaheta Aug 18, 2022
40a0a8e
Merge develop branch
auzaheta Sep 27, 2022
e80d17d
Add `GatherPreprocessing` testing plus minor improvements
auzaheta Sep 30, 2022
f7087e2
Add `envir` argument to `GatherPreprocessing()`
auzaheta Oct 3, 2022
c34807e
Debug Gather Preprocessing for rate submodel
auzaheta Oct 13, 2022
81c17f1
Styling code
auzaheta Jun 21, 2023
7aa5359
replace mapply by map and simplify
auzaheta Jun 21, 2023
2274cd3
Comply 80-character lenght line for R code
auzaheta Jun 21, 2023
62fa143
Run styler to the code
auzaheta Jun 21, 2023
f95188f
Solves #86 creating temporal flags and sender position objects
auzaheta Oct 11, 2023
5016141
Solves bug in printing output objects when DyNAM-choice formula has i…
auzaheta Oct 11, 2023
6e02e28
Update vignettes to the latest release of `manynet` and `migraph`
auzaheta Oct 11, 2023
08640e6
Merge develop branch
auzaheta Oct 18, 2023
be1598e
WIP debbuging compositional change behavior in R implementation
auzaheta Oct 19, 2023
1af3114
Debugging gather adding envir argument to calls
auzaheta Nov 1, 2023
c745c73
Debugging compositional change behavior in R implementation
auzaheta Nov 1, 2023
1d97e57
Debugging compositional change
auzaheta Nov 1, 2023
0ed392d
Add `envir` argument to `sanitizeEvents()`
auzaheta Nov 6, 2023
f6cf9f9
Adding `envir` argument to `estimate()`, and update the documentation…
auzaheta Nov 6, 2023
ed425ae
Merge feature_gather branch
auzaheta Mar 6, 2024
c9f19fd
Add helper objects for two-mode testing
auzaheta Mar 6, 2024
07fd137
Update URLs for project repository and Mac installation
auzaheta Mar 6, 2024
de3e9a6
Update vignettes
auzaheta Mar 6, 2024
037abd5
Remove work simulation files WIP
auzaheta Mar 6, 2024
a752536
Improve documentation and debug `GatherPreprocessing()`
auzaheta Mar 7, 2024
a245b19
Update vignettes and fix error with `migraph` in teaching1 vignette
auzaheta Mar 7, 2024
32e1d4d
Fix CRAN note, update configure file, and update URL addresses to new…
auzaheta Mar 7, 2024
58f65cd
Add missing documentation of argument in `GatherPreprocessing()` and …
auzaheta Mar 7, 2024
9fa6ffe
Debug opportunities list log-lik for choice model in a two-mode network
auzaheta Mar 11, 2024
773edc9
Create test for output functions, solves #85
auzaheta Mar 12, 2024
01c4402
Solves #87, bug when using preprocess init object and add test for it
auzaheta Mar 12, 2024
caa8b95
Update news with issues solved
auzaheta Mar 12, 2024
e75d85c
configure.ac file gets version from the DESCRIPTION file
auzaheta Mar 12, 2024
6c5c186
Revert "configure.ac file gets version from the DESCRIPTION file"
auzaheta Mar 12, 2024
c417c6e
Update date in DESCRIPTION
auzaheta Mar 13, 2024
7057fa0
Update cran comments
auzaheta Mar 13, 2024
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
52 changes: 52 additions & 0 deletions .github/OpenMP_mac.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,55 @@ SHLIB_LIBADD = -L/usr/local/lib
```

6. Installing goldfish from source should work now. Otherwise get in contact with the developer team.

### Update for M1, M2, ... machines

If you are using an M1, M2, ... machine, you could follow the previous instructions to install a `gcc` compiler and setting up the compilers for `R`.
Thanks to @eugeniagilpa, here there is an alternative version of the `Makevars` file that should work for M1, M2, ... machines:

```
XCBASE:=$(shell xcrun --show-sdk-path)
GCCBASE:=$(shell brew --prefix gcc)
GETTEXT:=$(shell brew --prefix gettext)

CC=$(GCCBASE)/bin/gcc-13
CXX=$(GCCBASE)/bin/g++-13
CXX11=$(GCCBASE)/bin/g++-13
CXX14=$(GCCBASE)/bin/g++-13
CXX17=$(GCCBASE)/bin/g++-13
CXX20=$(GCCBASE)/bin/g++-13
CXX23=$(GCCBASE)/bin/g++-13
SHLIB_CXXLD=$(GCCBASE)/bin/g++-13
FC=$(GCCBASE)/bin/gfortran
F77=$(GCCBASE)/bin/gfortran
FLIBS=-L/$(GCCBASE)/lib/gcc/13/ -lm -lgfortran

CPPFLAGS=-isystem "$(GCCBASE)/include" -isysroot "$(XCBASE)"
LDFLAGS=-L"$(GCCBASE)/lib" -L"$(GETTEXT)/lib" --sysroot="$(XCBASE)"

MAKE=make -j8

SHLIB_OPENMP_CFLAGS=-fopenmp
SHLIB_OPENMP_CXXFLAGS=-fopenmp
SHLIB_OPENMP_FCFLAGS=-fopenmp
SHLIB_OPENMP_FFLAGS=-fopenmp

SHLIB_CXXLDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXXFLAGS) $(CXXPICFLAGS) $(LTO_LD)
SHLIB_CXX11LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX11FLAGS) $(CXX11PICFLAGS) $(LTO_LD)
SHLIB_CXX14LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX14FLAGS) $(CXX14PICFLAGS) $(LTO_LD)
SHLIB_CXX17LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX17FLAGS) $(CXX17PICFLAGS) $(LTO_LD)
SHLIB_CXX20LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX20FLAGS) $(CXX20PICFLAGS) $(LTO_LD)
SHLIB_CXX23LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CXX23FLAGS) $(CXX23PICFLAGS) $(LTO_LD)

SHLIB_FCLDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(FCFLAGS) $(FPICFLAGS)
SHLIB_LDFLAGS = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CFLAGS) $(CPICFLAGS) $(LTO_LD)
SHLIB_LDFLAGS_R = -dynamiclib -Wl,-ld_classic,-headerpad_max_install_names -undefined dynamic_lookup $(CFLAGS) $(CPICFLAGS) $(LTO_LD)
```

In step 5 the path to the library should be:

```
SHLIB_LIBADD = -L/opt/homebrew/opt/gfortran/lib
```

Please share feedback on which of these work (shortcuts or unnecessary parts) and we will update the installation guide accordingly.
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Encoding: UTF-8
Package: goldfish
Type: Package
Title: Statistical Network Models for Dynamic Network Data
Version: 1.6.5
Date: 2023-06-20
Version: 1.6.6
Date: 2024-03-13
Authors@R: c(person("James", "Hollway", role = c("cre", "aut", "dtc"),
email = "[email protected]",
comment = c("IHEID", ORCID = "0000-0002-8361-9647")),
Expand All @@ -28,8 +28,8 @@ Description: Tools for fitting statistical network models to dynamic network dat
Stadtfeld, Hollway, and Block (2017b) <doi:10.1177/0081175017733457>,
Stadtfeld and Block (2017) <doi:10.15195/v4.a14>,
Hoffman et al. (2020) <doi:10.1017/nws.2020.3>.
URL: https://snlab-ch.github.io/goldfish/
BugReports: https://github.com/snlab-ch/goldfish/issues
URL: https://stocnet.github.io/goldfish/
BugReports: https://github.com/snlab-ch/goldfish/issues/
Depends: R (>= 3.5.0)
Imports:
Rcpp (>= 1.0.1),
Expand All @@ -54,6 +54,7 @@ Suggests:
igraph,
ggraph,
migraph,
manynet,
broom,
lmtest
VignetteBuilder: knitr
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ S3method(print,summary.result.goldfish)
S3method(summary,result.goldfish)
S3method(tidy,result.goldfish)
S3method(vcov,result.goldfish)
export(GatherPreprocessing)
export(defineDependentEvents)
export(defineGlobalAttribute)
export(defineGroups_interaction)
Expand Down
10 changes: 10 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# goldfish 1.6.6

* Debugging and extend documentation for `GatherPreprocessing()`.
* Fix note from CRAN checks.
* Debug issue when using a preprocess init object in `estimate()`.
* Debug issue with opportunity list in `estimate()` for `DyNAM` models.
* Fix error in printing output from `estimate()` when using
a parameter is fixed to a value.

# goldfish 1.6.5

* Solves `startTime` and `endTime` bug on `DyNAM` and `REM` models
preprocessing.
* Export `GatherPreprocessing()`. Experimental functionality.
* Clean unnecessary functions imports.
* Solves `aes_string()` deprecation.
* Solves issue on `C++` engine on DyNAM-rate.
Expand Down
62 changes: 33 additions & 29 deletions R/data_Fisheries_Treaties_6070.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#' including only bilateral agreements, fewer variables,
#' and ranging only between 1960 and 1970 inclusive.
#' This data set is only meant for testing, and not for inference.
#' It provides an example of an undirected, weighted (by integer/increment) network,
#' with composition change and both monadic and dyadic covariates.
#' It provides an example of an undirected, weighted (by integer/increment)
#' network, with composition change and both monadic and dyadic covariates.
#' Monadic variables include the dates states gain or lose sovereign status,
#' their polity score, and their GDP.
#' Dyadic variables include bilateral fisheries agreements between states,
Expand All @@ -24,38 +24,42 @@
#' See below for variables and formats.
#'
#' \tabular{lll}{
#' \strong{Object} \tab \strong{Description} \tab \strong{Format} \cr
#' states$label \tab Node identifier labels \tab character \cr
#' states$present \tab Node present in dataset \tab boolean \cr
#' states$regime \tab Placeholder for regime variable \tab numeric (NA) \cr
#' states$gdp \tab Placeholder for GDP variable \tab numeric (NA) \cr
#' sovchanges$time \tab Date of state sovereignty update \tab POSIXct \cr
#' sovchanges$node \tab Node for state sovereignty update \tab integer \cr
#' sovchanges$replace \tab State sovereignty update \tab boolean \cr
#' regchanges$time \tab Date of regime update \tab POSIXct \cr
#' regchanges$node \tab Node for regime update \tab integer \cr
#' regchanges$replace \tab Regime update \tab integer (-10--10) \cr
#' gdpchanges$time \tab Date of GDP update \tab POSIXct \cr
#' gdpchanges$node \tab Node for GDP update \tab integer \cr
#' gdpchanges$replace \tab GDP update \tab numeric \cr
#' bilatchanges$time \tab Date of bilateral change \tab POSIXct \cr
#' bilatchanges$sender \tab First bilateral change node \tab integer \cr
#' bilatchanges$receiver \tab Second bilateral change node \tab integer \cr
#' bilatchanges$increment \tab Create or dissolve action \tab numeric (-1 or 1) \cr
#' contigchanges$time \tab Date of contiguity change \tab POSIXct \cr
#' contigchanges$sender \tab First contiguity change node \tab integer \cr
#' contigchanges$receiver \tab Second contiguity change node \tab integer \cr
#' contigchanges$replace \tab New contiguity value \tab numeric \cr
#' \strong{Object} \tab \strong{Description} \tab \strong{Format} \cr
#' states$label \tab Node identifier labels \tab character \cr
#' states$present \tab Node present in dataset \tab boolean \cr
#' states$regime \tab Placeholder for regime variable \tab numeric (NA) \cr
#' states$gdp \tab Placeholder for GDP variable \tab numeric (NA) \cr
#' sovchanges$time \tab Date of state sovereignty update \tab POSIXct \cr
#' sovchanges$node \tab Node for state sovereignty update \tab integer \cr
#' sovchanges$replace \tab State sovereignty update \tab boolean \cr
#' regchanges$time \tab Date of regime update \tab POSIXct \cr
#' regchanges$node \tab Node for regime update \tab integer \cr
#' regchanges$replace \tab Regime update \tab integer (-10--10) \cr
#' gdpchanges$time \tab Date of GDP update \tab POSIXct \cr
#' gdpchanges$node \tab Node for GDP update \tab integer \cr
#' gdpchanges$replace \tab GDP update \tab numeric \cr
#' bilatchanges$time \tab Date of bilateral change \tab POSIXct \cr
#' bilatchanges$sender \tab First bilateral change node \tab integer \cr
#' bilatchanges$receiver \tab Second bilateral change node \tab integer \cr
#' bilatchanges$increment\tab Create or dissolve tie\tab numeric (-1 or 1)\cr
#' contigchanges$time \tab Date of contiguity change \tab POSIXct \cr
#' contigchanges$sender \tab First contiguity change node \tab integer \cr
#' contigchanges$receiver \tab Second contiguity change node \tab integer \cr
#' contigchanges$replace \tab New contiguity value \tab numeric \cr
#' }
#'
#' @references
#' Hollway, James, and Johan Koskinen. 2016. Multilevel Embeddedness: The Case of the Global Fisheries
#' Governance Complex. \emph{Social Networks}, 44: 281-94. doi:10.1016/j.socnet.2015.03.001.
#' Hollway, James, and Johan Koskinen. 2016.
#' Multilevel Embeddedness: The Case of the Global Fisheries Governance Complex.
#' \emph{Social Networks}, 44: 281-94. \doi{10.1016/j.socnet.2015.03.001}.
#'
#' Hollway, James, and Johan H Koskinen. 2016. Multilevel Bilateralism and Multilateralism: States' Bilateral and
#' Hollway, James, and Johan H Koskinen. 2016.
#' Multilevel Bilateralism and Multilateralism: States' Bilateral and
#' Multilateral Fisheries Treaties and Their Secretariats.
#' In \emph{Multilevel Network Analysis for the Social Sciences}, edited by Emmanuel Lazega and Tom A B Snijders,
#' 315-32. Cham: Springer International Publishing. doi:10.1007/978-3-319-24520-1_13.
#' In \emph{Multilevel Network Analysis for the Social Sciences},
#' edited by Emmanuel Lazega and Tom A B Snijders,
#' 315-32. Cham: Springer International Publishing.
#' \doi{10.1007/978-3-319-24520-1_13}.
#'
#' @keywords datasets dynamic political network states fisheries
NULL
Expand Down
48 changes: 28 additions & 20 deletions R/data_RFID_Validity_Study.R
Original file line number Diff line number Diff line change
Expand Up @@ -14,31 +14,39 @@
#' @docType data
#' @usage data(RFID_Validity_Study)
#' @format 3 dataframes: \cr
#' - participants (11 rows, 7 columns): attributes of the experiment's participants\cr
#' - rfid (1011 rows, 4 columns): dyadic interactions detected by the RFID badges (after data processing)\cr
#' - video (219 rows, 4 columns): dyadic interactions detected by the video rating\cr
#' - participants (11 rows, 7 columns):
#' attributes of the experiment's participants\cr
#' - rfid (1011 rows, 4 columns): dyadic interactions detected
#' by the RFID badges (after data processing)\cr
#' - video (219 rows, 4 columns): dyadic interactions detected
#' by the video rating\cr
#' and one network:\cr
#' - known.before (11 rows, 11 columns): network of previous acquaintances\cr
#' See below for variables and formats.\cr
#'
#'\tabular{lll}{
#' \tabular{lll}{
#' \strong{Object} \tab \strong{Description} \tab \strong{Format} \cr
#' participants$actor \tab Identifier of the actor \tab integer \cr
#' participants$label \tab (Anonymized) name \tab Factor \cr
#' participants$present \tab Presence of the actor (all actors are present) \tab logical \cr
#' participants$age \tab Actor's age \tab integer \cr
#' participants$gender \tab Actor's gender (0: male, 1: female) \tab integer \cr
#' participants$group \tab Actor's group affiliation (groups have distinct ids) \tab integer \cr
#' participants$level \tab Actor's seniority (1: MSc student, 2: PhD student, 3: PostDoc, 4: Prof)
#' \tab integer \cr
#' rfid$NodeA \tab Identifier for the first actor \tab chr \cr
#' rfid$NodeB \tab Identifier for the second actor \tab chr \cr
#' rfid$Start \tab Time of the beginning of the dyadic interaction \tab integer \cr
#' rfid$End \tab Time of the end of the dyadic interaction \tab integer \cr
#' video$NodeA \tab Identifier for the first actor \tab chr \cr
#' video$NodeB \tab Identifier for the second actor \tab chr \cr
#' video$Start \tab Time of the beginning of the dyadic interaction \tab integer \cr
#' video$End \tab Time of the end of the dyadic interaction \tab integer \cr
#' participants$actor \tab Identifier of the actor \tab integer \cr
#' participants$label \tab (Anonymized) name \tab Factor \cr
#' participants$present \tab Presence of the actor (all actors are present)
#' \tab logical \cr
#' participants$age \tab Actor's age \tab integer \cr
#' participants$gender \tab Actor's gender (0: male, 1: female)
#' \tab integer \cr
#' participants$group
#' \tab Actor's group affiliation (groups have distinct ids) \tab integer \cr
#' participants$level \tab Actor's seniority
#' (1: MSc student, 2: PhD student, 3: PostDoc, 4: Prof) \tab integer \cr
#' rfid$NodeA \tab Identifier for the first actor \tab chr \cr
#' rfid$NodeB \tab Identifier for the second actor \tab chr \cr
#' rfid$Start \tab Time of the beginning of the dyadic interaction
#' \tab integer \cr
#' rfid$End \tab Time of the end of the dyadic interaction \tab integer \cr
#' video$NodeA \tab Identifier for the first actor \tab chr \cr
#' video$NodeB \tab Identifier for the second actor \tab chr \cr
#' video$Start \tab Time of the beginning of the dyadic interaction
#' \tab integer \cr
#' video$End \tab Time of the end of the dyadic interaction \tab integer \cr
#' }
#'
#' @source \url{https://osf.io/rrhxe/}
Expand Down
38 changes: 22 additions & 16 deletions R/data_Social_Evolution.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,35 @@
#' @name Social_Evolution
#' @docType data
#' @usage data(Social_Evolution)
#' @format 3 dataframes: actors (84 rows, 4 columns), calls (439 rows, 4 columns), friendship (766 rows, 4 columns).
#' @format 3 dataframes: actors (84 rows, 4 columns),
#' calls (439 rows, 4 columns), friendship (766 rows, 4 columns).
#' See below for variables and formats.
#'
#' \tabular{lll}{
#' \strong{Object} \tab \strong{Description} \tab \strong{Format} \cr
#' actors$label \tab Actor identifier labels \tab character \cr
#' actors$present \tab Actor present in dataset \tab boolean \cr
#' actors$floor \tab Floor of residence actor lives on \tab numeric (1-9) \cr
#' actors$gradeType \tab Degree level \tab numeric (1-5) \cr
#' calls$time \tab Time and date of call \tab numeric from POSIXct \cr
#' calls$sender \tab Initiator of phone call \tab character \cr
#' calls$receiver \tab Recipient of phone call \tab character \cr
#' calls$increment \tab Indicates call number increment (all 1s) \tab numeric (1) \cr
#' friendship$time \tab Time and date of friend nomination \tab numeric from POSIXct \cr
#' friendship$sender \tab Nominator of friendship \tab character \cr
#' friendship$receiver \tab Nominee of friendship \tab character \cr
#' friendship$replace \tab Indicates friendship value at $time \tab numeric \cr
#' \strong{Object} \tab \strong{Description} \tab\strong{Format} \cr
#' actors$label \tab Actor identifier labels \tab character \cr
#' actors$present \tab Actor present in dataset \tab boolean \cr
#' actors$floor \tab Floor of residence actor lives on
#' \tab numeric (1-9) \cr
#' actors$gradeType \tab Degree level \tab numeric (1-5) \cr
#' calls$time \tab Time and date of call \tab numeric from POSIXct \cr
#' calls$sender \tab Initiator of phone call \tab character \cr
#' calls$receiver \tab Recipient of phone call \tab character \cr
#' calls$increment \tab Indicates call number increment (all 1s)
#' \tab numeric (1) \cr
#' friendship$time \tab Time and date of friend nomination
#' \tab numeric from POSIXct \cr
#' friendship$sender \tab Nominator of friendship \tab character \cr
#' friendship$receiver \tab Nominee of friendship \tab character \cr
#' friendship$replace \tab Indicates friendship value at $time
#' \tab numeric \cr
#' }
#'
#' @source \url{http://realitycommons.media.mit.edu/socialevolution.html}
#' @references
#' A. Madan, M. Cebrian, S. Moturu, K. Farrahi, A. Pentland (2012). Sensing the 'Health State' of a Community.
#' \emph{Pervasive Computing. 11}, 4, pp. 36-45.
#' A. Madan, M. Cebrian, S. Moturu, K. Farrahi, A. Pentland (2012).
#' Sensing the 'Health State' of a Community.
#' \emph{Pervasive Computing. 11}, 4, pp. 36-45. \doi{10.1109/MPRV.2011.79}.
#'
#' @keywords datasets social evolution network
NULL
Expand Down
Loading
Loading