{"id":31041729,"url":"https://github.com/stocnet/goldfish","last_synced_at":"2025-09-14T10:40:39.319Z","repository":{"id":37433929,"uuid":"207816908","full_name":"stocnet/goldfish","owner":"stocnet","description":"Actor-oriented and tie-based network event models in R","archived":false,"fork":false,"pushed_at":"2025-08-12T13:01:29.000Z","size":6328,"stargazers_count":63,"open_issues_count":22,"forks_count":13,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-09-07T12:41:37.260Z","etag":null,"topics":["dynam","network-modelling","rem","statistical-network-analysis"],"latest_commit_sha":null,"homepage":"https://stocnet.github.io/goldfish/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stocnet.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-09-11T13:16:31.000Z","updated_at":"2025-07-28T09:54:57.000Z","dependencies_parsed_at":"2023-11-06T10:25:18.856Z","dependency_job_id":"2127a2dc-d9b2-43c7-8cb6-f2a2b4e610b7","html_url":"https://github.com/stocnet/goldfish","commit_stats":null,"previous_names":["stocnet/goldfish","snlab-ch/goldfish"],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/stocnet/goldfish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocnet%2Fgoldfish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocnet%2Fgoldfish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocnet%2Fgoldfish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocnet%2Fgoldfish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stocnet","download_url":"https://codeload.github.com/stocnet/goldfish/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stocnet%2Fgoldfish/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274395863,"owners_count":25277387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-09T02:00:10.223Z","response_time":80,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dynam","network-modelling","rem","statistical-network-analysis"],"created_at":"2025-09-14T10:40:33.839Z","updated_at":"2025-09-14T10:40:39.302Z","avatar_url":"https://github.com/stocnet.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\nbibliography: inst/REFERENCES.bib\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r setup, include=FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\nlibrary(goldfish)\n```\n\n# goldfish  \u003cimg src=\"man/figures/logo.png\" align=\"right\" width=\"150\"/\u003e \n\n\u003c!-- badges: start --\u003e\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/stocnet/goldfish)\n![GitHub Release Date](https://img.shields.io/github/release-date/stocnet/goldfish)\n![GitHub issues](https://img.shields.io/github/issues-raw/stocnet/goldfish)\n![GitHub All Releases](https://img.shields.io/github/downloads/stocnet/goldfish/total)\n[![R-CMD-check](https://github.com/stocnet/goldfish/actions/workflows/R-CMD-check.yml/badge.svg)](https://github.com/stocnet/goldfish/actions/workflows/R-CMD-check.yml)\n[![Codecov test coverage](https://codecov.io/gh/stocnet/goldfish/branch/main/graph/badge.svg)](https://app.codecov.io/gh/stocnet/goldfish?branch=main)\n[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/4563/badge)](https://www.bestpractices.dev/projects/4563)\n\u003c!-- badges: end --\u003e\n\n\u003c!-- [![CodeFactor](https://www.codefactor.io/repository/github/stocnet/goldfish/badge)](https://www.codefactor.io/repository/github/stocnet/goldfish) --\u003e\n\n## Description\n\nThe `{goldfish}` package offers a collection of tools designed for applying\nstatistical models to dynamic network data.\nIt primarily focus on models for relational event data, namely,\nsequences of interactions between actors or entities within a network,\nenriched by fine-grained time-stamps information.\nRelational event data emerge in various domains,\nsuch as automatically collected data about interactions in\ncommunication and social media research,\nsocial science studies using social sensors,\nand archival network studies that provide in-depth details regarding\nthe timing or sequence of relational actions between nodes.\n\nCurrently, the package includes the following models:\n\n- **Dynamic Network Actor Models (DyNAM)**: Investigate relational event models\n  as an actor-oriented decision process. \n  - *rate*: Actors compete for creating the next relational event [@hollway2020rate]\n  - *choice*: The active actor chooses the receiver of the event from among the same [@stadtfeld2017interaction] or a different set of nodes [@hollway2022multimodal]\n  - *choice_coordination*: The creation of coordination ties as a two-sided\n    process [@stadtfeld2017coordination]\n- **Dynamic Network Actor Models for interactions (DyNAMi)**:\n  Investigate dynamics of conversation groups and interpersonal interaction in\n  different social contexts from an actor-oriented perspective \n  [@hoffman2020groups]\n  - *rate*: Actors compete for joining or leaving groups\n  - *choice*: The active actor choose the group to join\n- **Relational Event Models (REM)**: Investigate relational event models\n  as a tie-oriented process [@butts2008relational], taking into account right-censoring [@stadtfeld2017rejoinder].\n  \n### Vignettes\n\nFor detailed documentation on each model, including usage examples, users are\nencouraged to consult the package's vignettes and help files:\n\n- [Getting Started with goldfish (DyNAM and \n  REM)](https://stocnet.github.io/goldfish/articles/teaching1.html)\n- [Coordination ties (DyNAM-choice\n  coordination)](https://stocnet.github.io/goldfish/articles/teaching2.html)\n- [Face to face interactions \n  (DyNAMi)](https://stocnet.github.io/goldfish/articles/dynami-example.html)\n- [Catalog of available \n  effects](https://stocnet.github.io/goldfish/articles/goldfishEffects.html)\n  \n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n    + [Define data objects and link events](#define-data-objects-and-link-events)\n    + [Define dependent events](#define-dependent-events)\n    + [Model specification and estimation](#model-specification-and-estimation)\n- [About](#about)\n- [References](#references)\n\n## Installation\n\nYou can install `{goldfish}` directly from\n[CRAN](https://cran.r-project.org/package=goldfish):\n\n``` r load_package\ninstall.packages(\"goldfish\")\n```\n\nTo install the development version from GitHub, use the\n[remotes](https://cran.r-project.org/package=remotes) package:\n\n- For latest stable version: \n`remotes::install_github(\"stocnet/goldfish\", build_vignettes = TRUE)`\n- For latest development version: \n`remotes::install_github(\"stocnet/goldfish@develop\", build_vignettes = TRUE)`\n\nOr by downloading and install the latest binary releases for all major OSes\n-- Windows, Mac, and Linux -- can be found \n[here](https://github.com/stocnet/goldfish/releases).\n\n## Usage\n\nBelow is a quick-start guide to using the `{goldfish}` package.\nThe dataset used in this example is an abbreviated version of the\nMIT Social Evolution data (`?Social_Evolution`).\n\n### Define data objects and link events\n\nThe main data objects required for the analysis are the node set(s) \n`make_nodes()` and network(s) `make_network()`.\nThe node set object contains labels and attributes of the actors in the network.\nIn contrast, a network object contains the information of past relational events\nbetween actors.\nBy default, `make_network()` constructs an empty matrix, its dimensions\ndefined by the length of the nodeset(s).\nData frames containing event data that modify these data objects can be\nlinked to them using the `link_events()` method.\n\n```{r load_data}\nlibrary(goldfish)\ndata(\"Social_Evolution\")\n\ncallNetwork \u003c- make_network(nodes = actors, directed = TRUE) |\u003e # 1\n  link_events(change_events = calls, nodes = actors) # 2\n\n```\n\nThe events data frame, which indicates the time-varying attributes in\nthe node set, contains the following columns:\n\n- `time`: The time when the attribute changes,\n  either a `numeric` or `POSIXct` value.\n- `node`: The node for which the attribute changes, a `character` value\n  that matches the `label` variable in the node set.\n- `replace`: The new value of the attribute, a `numeric` value.\n\nThe events data frame that details the relational events between actors\ncontains the following columns:\n\n- `time`: The time when the event occurred,\n  either a `numeric` or `POSIXct` value.\n- `sender`: The actor initiating the event, a `character` value\n  that matches the `label` variable in the node set.\n- `receiver`: The actor receiving the event, a `character` value\n  that matches the `label` variable in the node set.\n- `increment` or `replace`: A `numeric` value indicating either the increment\n  that the relational event represents or the new value.\n\n### Define dependent events\n\nThe next step in defining the data objects is to identify the dependent events.\nHere we would like to model as the dependent variable the calls\nbetween individuals.\nWe specify the event data frame and the node set.\n\n```{r dependent_events}\ncallsDependent \u003c- make_dependent_events(\n  events = calls, nodes = actors,\n  default_network = callNetwork\n  )\n```\n\nThe final step is to make a goldfish object.\nThe data object is a goldfish object that contains all the information\nneeded to estimate the model.\nSo, it is a container for the dependent events, the networks, and the nodes\ncontaining all the information of the dependent events and any dyadic or\nnodal covariate used as explanatory variables in the model.\n\n```{r goldfish_object}\nsocialEvolutionData \u003c- make_data(\n  callsDependent, callNetwork, calls, actors\n)\n```\n\n### Model specification and estimation\n\nWe specify our model using the standard R formula format like:\n\n`goldfish_dependent ~ effects(process_state_element)`\n\nWe can see which effects are currently available and how to specify them here:\n\n\n```r\nvignette(\"goldfishEffects\")\n```\n\nNow to estimate this model, we use the a `?estimate` function.\nFor the DyNAM model the `estimate_dynam()` function is used.\n\n```{r}\nmod00Rate \u003c- estimate_dynam(\n  callsDependent ~ indeg + outdeg,\n  sub_model = \"rate\",\n  data = socialEvolutionData\n)\n\nsummary(mod00Rate)\n\nmod00Choice \u003c- estimate_dynam(\n  callsDependent ~ inertia + recip + trans,\n  sub_model = \"choice\",\n  data = socialEvolutionData\n)\nsummary(mod00Choice)\n```\n\n\n## About\n\nThis project is a joint collaboration between the **Social Networks Lab at ETH Zürich** and the **Geneva Graduate Institute**,\nand incorporates and supports several sub-projects.\n\n## References\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstocnet%2Fgoldfish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstocnet%2Fgoldfish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstocnet%2Fgoldfish/lists"}