Package {remverse}


Title: Comprehensive Tools for Relational Event History Data
Version: 0.2.0
Description: A unified interface for relational event history analysis. The package re-exports key functions from 'remify', 'remstats', and 'remstimate' to support a streamlined workflow from data processing to model estimation and diagnosis.
License: MIT + file LICENSE
BugReports: https://github.com/TilburgNetworkGroup/remverse/issues
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: remify (≥ 4.1.0), remstats (≥ 4.1.0), remstimate (≥ 3.1.0)
Depends: R (≥ 4.0), remdata (≥ 0.2.1)
Suggests: tinytest, knitr, rmarkdown, survival, coxme, lme4, glmmTMB, glmnet, flexmix, shrinkem (≥ 0.4.0)
LazyData: true
VignetteBuilder: knitr
LazyDataCompression: gzip
NeedsCompilation: no
Packaged: 2026-07-18 18:09:57 UTC; jorismulder
Author: Joris Mulder [aut, cre], Giuseppe Arena [aut], Marlyne Meijerink-Bosman [aut], Rumana Lakdawala [aut], Roger Leenders [aut], Fabio Generoso Vieira [aut], Mahdi Shafiee Kamalabad [aut], Diana Karimova [ctb]
Maintainer: Joris Mulder <j.mulder3@tilburguniversity.edu>
Repository: CRAN
Date/Publication: 2026-07-18 18:40:02 UTC

remverse: Comprehensive Tools for Relational Event History Data

Description

A unified interface for relational event history analysis. remverse re-exports key functions from remify, remstats, and remstimate, and depends on remdata so its example datasets are available once remverse is attached.

Details

The ⁠@import remdata⁠ below declares remdata in the package namespace. It is a Depends (attached for its datasets), and importing it here satisfies R CMD check's requirement that a Depends package also be imported, so the namespace resolves correctly when remverse is loaded but not attached.

Author(s)

Maintainer: Joris Mulder j.mulder3@tilburguniversity.edu

Authors:

Other contributors:

See Also

Useful links:


AICC

Description

See AICC.

Usage

AICC(object, ...)

Arguments

object

is a remstimate object.

...

further arguments to be passed to the 'AICC' method.


FEtype

Description

See FEtype.

Usage

FEtype()

WAIC

Description

See WAIC.

Usage

WAIC(object, ...)

Arguments

object

is a remstimate object.

...

further arguments to be passed to the 'WAIC' method.


activeDegreeDyad

Description

See activeDegreeDyad.

Usage

activeDegreeDyad(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeDegreeMax

Description

See activeDegreeMax.

Usage

activeDegreeMax(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeDegreeMin

Description

See activeDegreeMin.

Usage

activeDegreeMin(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeIndegreeReceiver

Description

See activeIndegreeReceiver.

Usage

activeIndegreeReceiver(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeOutdegreeSender

Description

See activeOutdegreeSender.

Usage

activeOutdegreeSender(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeReciprocalTie

Description

See activeReciprocalTie.

Usage

activeReciprocalTie(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeSharedPartners

Description

See activeSharedPartners.

Usage

activeSharedPartners(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeSharedPartners_isp

Description

See activeSharedPartners_isp.

Usage

activeSharedPartners_isp(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeSharedPartners_itp

Description

See activeSharedPartners_itp.

Usage

activeSharedPartners_itp(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeSharedPartners_osp

Description

See activeSharedPartners_osp.

Usage

activeSharedPartners_osp(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeSharedPartners_otp

Description

See activeSharedPartners_otp.

Usage

activeSharedPartners_otp(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeTie

Description

See activeTie.

Usage

activeTie(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeTotaldegreeDyad

Description

See activeTotaldegreeDyad.

Usage

activeTotaldegreeDyad(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeTotaldegreeReceiver

Description

See activeTotaldegreeReceiver.

Usage

activeTotaldegreeReceiver(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


activeTotaldegreeSender

Description

See activeTotaldegreeSender.

Usage

activeTotaldegreeSender(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

Scaling applied to the raw statistic before returning:

"none"

Raw counts (default).

"std"

Per-time-point standardisation: (x - \bar{x}) / \mathrm{sd}(x), computed over the D dyads in the fixed risk set.

consider_type

Character (or logical). How event types are handled:

"ignore" or FALSE

Aggregate over all event types (default). Counts all currently active events regardless of type.

"separate" or TRUE

Compute one statistic per event type. Only active events of that type contribute. Output effect names are suffixed with the type label, e.g. activeOutdegreeSender.X.start.

"interact"

Compute one statistic per (past-event type x dyad type) combination (C^2 slices). Requires extend_riskset_by_type = TRUE in the remify call; otherwise silently coerced to "separate".


actor_effects

Description

See actor_effects.

Usage

actor_effects(step = NULL)

Arguments

step

outputs all statistics in the sender activity step (if 'step = sender') or receiver choice step (if 'step = receiver').


ao_data

Description

See ao_data.


aomstats

Description

See aomstats.

Usage

aomstats(
  reh,
  sender_effects = NULL,
  receiver_effects = NULL,
  memory = c("full", "window", "decay", "interval"),
  memory_value = NA,
  first = 2,
  last = Inf,
  display_progress = FALSE,
  attr_actors = NULL,
  attr_dyads = NULL
)

Arguments

reh

an object of class "remify" characterizing the relational event history. May also be a remify_durem object for duration relational event models.

sender_effects

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the effects in the sender activity rate step of the actor-oriented model for which statistics are computed, see ‘Details’

receiver_effects

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the effects in the receiver choice step of model for which statistics are computed, see ‘Details’

memory

The memory to be used. See ‘Details’.

memory_value

Numeric value indicating the memory parameter. Default is NA, which is only valid for memory = "full" (no memory parameter required). See ‘Details’.

first

an optional integer value, specifying the index of the first unique time point event in the relational event history for which statistics must be computed (see 'Details'). Default is 2: the first event has no history and is used only to initialize statistics, not to fit the model.

last

an optional integer value, specifying the index of the last unique time point in the relational event history for which statistics must be computed (see 'Details')

display_progress

should a progress bar for the computation of the endogenous statistics be shown (TRUE) or not (FALSE)?

attr_actors

optionally, an object of class "data.frame" that contains exogenous attributes for actors (see Details).

attr_dyads

optionally, an object of class data.frame or matrix containing attribute information for dyads (see Details).


average

Description

See average.

Usage

average(variable, attr_actors = NULL, scaling = c("none", "std"), attr_data)

Arguments

variable

string with the name of the column in the attr_actors object for which the statistic has to be computed.

attr_actors

optionally, an object of class data.frame that contains the attribute, see 'Details.'

scaling

the method for scaling the statistic. Default is to not scale the statistic. Alternatively, standardization of the statistic per time point can be requested with "std".

attr_data

Deprecated argument. Please use 'attr_actors' instead.


bic_table

Description

See bic_table.

Usage

bic_table(x, ...)

Arguments

x

A remstimate_mixrem_list returned when k is a vector in remstimate(..., method = "MIXREM").

...

Unused.


bind_remstats

Description

See bind_remstats.

Usage

bind_remstats(...)

Arguments

...

Any number of remstats objects. All the remstats objects must have matching dimensions, except for the third dimension. Note that duplicated statistics in the combined object are removed based on their name.


degreeDiff

Description

See degreeDiff.

Usage

degreeDiff(scaling = c("none", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, standardization of the degree difference per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


degreeMax

Description

See degreeMax.

Usage

degreeMax(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by two times the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


degreeMin

Description

See degreeMin.

Usage

degreeMin(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by two times the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


diagnostics

Description

See diagnostics.

Usage

diagnostics(object, reh, stats, ...)

Arguments

object

is a remstimate object.

reh

is a remify object, the same used for the 'remstimate' object.

stats

is a remstats object, the same used for the 'remstimate' object.

...

further arguments to be passed to the 'diagnostics' method.


difference

Description

See difference.

Usage

difference(
  variable,
  attr_actors = NULL,
  scaling = c("none", "std"),
  absolute = TRUE,
  attr_data
)

Arguments

variable

string with the name of the column in the attr_actors object for which the statistic has to be computed.

attr_actors

optionally, an object of class data.frame that contains the attribute, see 'Details.'

scaling

the method for scaling the statistic. Default is to not scale the statistic. Alternatively, standardization of the statistic per time point can be requested with "std".

absolute

Logical value indicating whether the difference values should be converted to the absolute difference (default is TRUE).

attr_data

Deprecated argument. Please use 'attr_actors' instead.


dlcrem

Description

See dlcrem.

Usage

dlcrem(reh, stats, k = 2L, nrep = 3L, ...)

Arguments

reh

A remify object.

stats

A remstats object.

k

Number of latent classes (default 2).

nrep

Number of random restarts (default 3).

...

Additional arguments passed to remstimate.


dyad

Description

See dyad.

Usage

dyad(variable, attr_dyads = NULL, scaling = c("none", "std"), x, variableName)

Arguments

variable

A string specifying the attribute to compute the statistic. If attr_dyads is a data.frame, this refers to the column name in attr_actors. If attr_dyads is a matrix, this corresponds to the name of the exogenous attribute, used to label the statistic in the resulting remstats object.

attr_dyads

A data.frame or matrix containing attribute information for dyads. If attr_dyads is a data.frame, the first two columns should represent "actor1" and "actor2" (for directed events, "actor1" corresponds to the sender, and "actor2" corresponds to the receiver). Additional columns can represent dyads' exogenous attributes. If attributes vary over time, include a column named "time". If attr_dyads is a matrix, the rows correspond to "actor1", columns to "actor2", and cells contain dyads' exogenous attributes.

scaling

The method for scaling the statistic. The default is no scaling. Alternatively, standardization of the statistic per time point can be requested with "std".

x

Deprecated argument. Please use 'attr_dyads' instead.

variableName

Deprecated argument. Please use 'variable' instead.


Example relational event history with duration

Description

A small directed relational event history where each event has a known start and end time, suitable for duration modeling.

Usage

data(edgelist_duration)

Format

A data frame with columns:

time

Event start time.

actor1

Sender.

actor2

Receiver.

end_time

Event end time.

Examples

data(edgelist_duration)
reh <- remify(edgelist_duration, duration = TRUE)


event

Description

See event.

Usage

event(variable, event_attr)

Arguments

variable

string with the name of the column in the event_attr object for which the statistic has to be computed.

event_attr

an object of class data.frame that contains the attribute


frailty_rem

Description

See frailty_rem.

Usage

frailty_rem(reh, stats, ...)

Arguments

reh

A remify or remify_durem object.

stats

A remstats object (tomstats, aomstats, or remstats_durem).

...

Additional arguments passed to remstimate.


history_durem

Description

A duration-extended version of the history dataset. Each row is one directed interaction among 10 actors with a start time (time) and end time (end). Right-censored events have end = NA.

Usage

history_durem

Format

A data frame with 115 rows and 6 columns:

time

Start time of the event (seconds)

actor1

Initiating actor ID

actor2

Receiving actor ID

setting

Context: "work" or "social"

weight

Intrinsic event weight

end

End time of the event (NA = right-censored)


indegreeReceiver

Description

See indegreeReceiver.

Usage

indegreeReceiver(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


indegreeSender

Description

See indegreeSender.

Usage

indegreeSender(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


inertia

Description

See inertia.

Usage

inertia(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the inertia statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, the statistics can be scaled by specifying 'prop', in which raw counts are divided by the outdegree of the sender at time t (see 'details') or standardization of the raw counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


Exogenous information of 5 actors

Description

A dataset containing the (hypothetical) age of the actors in a social network of a relational event history randomREH3.

Usage

data(info3)

Format

A dataframe with 7 rows and 4 variables:

name

numeric id of the actor

time

numeric value, describes when the value of the covariate changes, if it changes

age

age of the actor

sex

dichotomized sex of the actor (e.g., 0 = male, 1 = female)

See Also

randomREH3 for the relational event history.


is.remify_durem

Description

See is.remify_durem.

Usage

is.remify_durem(x)

Arguments

x

Any R object.


is.remstats_durem

Description

See is.remstats_durem.

Usage

is.remstats_durem(x)

Arguments

x

Any R object.


isp

Description

See isp.

Usage

isp(unique = FALSE, scaling = c("none", "std"), consider_type = "ignore")

Arguments

unique

A logical value indicating whether to sum the minimum of events with third actors (FALSE, default) or the number of third actors that create a new, unique shared partner (TRUE). See details for more information.

scaling

the method for scaling the triad statistic. Default is to not scale the statistic but keep the raw 'counts'. Alternatively, standardization of the raw counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


itp

Description

See itp.

Usage

itp(unique = FALSE, scaling = c("none", "std"), consider_type = "ignore")

Arguments

unique

A logical value indicating whether to sum the minimum of events with third actors (FALSE, default) or the number of third actors that create a new, unique two-path (TRUE). See details for more information.

scaling

The method for scaling the triad statistic. The default value is "none", which means the statistic is not scaled. Alternatively, you can set it to "std" to request standardization of the raw counts per time point.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


maximum

Description

See maximum.

Usage

maximum(variable, attr_actors = NULL, scaling = c("none", "std"), attr_data)

Arguments

variable

string with the name of the column in the attr_actors object for which the statistic has to be computed.

attr_actors

optionally, an object of class data.frame that contains the attribute, see 'Details.'

scaling

the method for scaling the statistic. Default is to not scale the statistic. Alternatively, standardization of the statistic per time point can be requested with "std".

attr_data

Deprecated argument. Please use 'attr_actors' instead.


minimum

Description

See minimum.

Usage

minimum(variable, attr_actors = NULL, scaling = c("none", "std"), attr_data)

Arguments

variable

string with the name of the column in the attr_actors object for which the statistic has to be computed.

attr_actors

optionally, an object of class data.frame that contains the attribute, see 'Details.'

scaling

the method for scaling the statistic. Default is to not scale the statistic. Alternatively, standardization of the statistic per time point can be requested with "std".

attr_data

Deprecated argument. Please use 'attr_actors' instead.


osp

Description

See osp.

Usage

osp(unique = FALSE, scaling = c("none", "std"), consider_type = "ignore")

Arguments

unique

A logical value indicating whether to sum the minimum of events with third actors (FALSE, default) or the number of third actors that create a new, unique shared partner (TRUE). See details for more information.

scaling

the method for scaling the triad statistic. Default is to not scale the statistic but keep the raw 'counts'. Alternatively, standardization of the raw counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


otp

Description

See otp.

Usage

otp(unique = FALSE, scaling = c("none", "std"), consider_type = "ignore")

Arguments

unique

A logical value indicating whether to sum the minimum of events with third actors (FALSE, default) or the number of third actors that create a new, unique two-path (TRUE). See details for more information.

scaling

The method for scaling the triad statistic. The default value is "none", which means the statistic is not scaled. Alternatively, you can set it to "std" to request standardization of the raw counts per time point.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


outdegreeReceiver

Description

See outdegreeReceiver.

Usage

outdegreeReceiver(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


outdegreeSender

Description

See outdegreeSender.

Usage

outdegreeSender(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


psABA

Description

See psABA.

Usage

psABA()

psABAB

Description

See psABAB.

Usage

psABAB(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


psABAY

Description

See psABAY.

Usage

psABAY(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


psABB

Description

See psABB.

Usage

psABB()

psABBA

Description

See psABBA.

Usage

psABBA(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


psABBY

Description

See psABBY.

Usage

psABBY(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


psABX

Description

See psABX.

Usage

psABX()

psABXA

Description

See psABXA.

Usage

psABXA(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


psABXB

Description

See psABXB.

Usage

psABXB(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


psABXY

Description

See psABXY.

Usage

psABXY(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


randomREH

Description

See randomREH.


Generated Relational Event History with Duration, Type, and Weight

Description

A randomly generated sequence of 999 duration relational events among 5 actors. Starting an event depended on inertia, reciprocity, sender out-degree, incoming shared partners, and sender age; (undirected) ending an event depended on the dyad's total active degree and the age difference of the two actors. Exponential memory decay was used with a half-life of 2000. Actor covariates are in info3.

Usage

data(randomREH3)

Format

data(randomREH3) loads a data.frame with 999 rows and 6 columns:

time

the timestamp indicating when each event started;

actor1

the actor that generated (initiated) the event;

actor2

the actor that received the event;

end

the time at which the event ended (NA = right-censored);

setting

the setting (type) of the event, either social or work;

duration

the duration of each event (end - time), which can also serve as an event weight.

See Also

info3 for actor covariates.


receive

Description

See receive.

Usage

receive(variable, attr_actors = NULL, scaling = c("none", "std"), attr_data)

Arguments

variable

string with the name of the column in the attr_actors object for which the statistic has to be computed.

attr_actors

optionally, an object of class data.frame that contains the attribute, see 'Details.'

scaling

the method for scaling the statistic. Default is to not scale the statistic. Alternatively, standardization of the statistic per time point can be requested with "std".

attr_data

Deprecated argument. Please use 'attr_actors' instead.


recencyContinue

Description

See recencyContinue.

Usage

recencyContinue(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


recencyReceiveReceiver

Description

See recencyReceiveReceiver.

Usage

recencyReceiveReceiver(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


recencyReceiveSender

Description

See recencyReceiveSender.

Usage

recencyReceiveSender(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


recencySendReceiver

Description

See recencySendReceiver.

Usage

recencySendReceiver(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


recencySendSender

Description

See recencySendSender.

Usage

recencySendSender(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


reciprocity

Description

See reciprocity.

Usage

reciprocity(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the reciprocity statistic. Default is to not scale the statistic but keep the raw 'counts'. Alternatively, the statistics can be scaled by 'prop', in which raw counts are divided by the indegree of the sender at time t (see 'details') or standardization of the raw counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


remfrailty

Description

See remfrailty.

Usage

remfrailty(
  reh,
  stats,
  approach = c("frequentist", "Bayesian"),
  engine = "auto",
  ...
)

Arguments

reh

A remify or remify_durem object.

stats

A remstats object (tomstats, aomstats, or remstats_durem).

approach

Either "frequentist" or "Bayesian". Bayesian frailty is not offered in this version.

engine

For frequentist, the interval-model backend: "glmmTMB" or "lme4". The default "auto" uses glmmTMB when installed, otherwise lme4. Ignored for ordinal models, which always use coxme.

...

Additional arguments passed to remstimate.


remify

Description

See remify.

Usage

remify(
  edgelist,
  directed = TRUE,
  ordinal = FALSE,
  model = c("tie", "actor"),
  actors = NULL,
  riskset = c("full", "active", "active_saturated", "manual"),
  manual_riskset = NULL,
  extend_riskset_by_type = FALSE,
  event_type = NULL,
  event_weight = NULL,
  origin = NULL,
  time_units = c("auto", "secs", "mins", "hours", "days", "weeks", "months", "years"),
  aggregate_time = 1,
  attach_riskset = TRUE,
  riskset_decode = c("labels", "ids", "none"),
  riskset_max_decode = 200000L,
  event_attributes = NULL,
  ncores = 1L,
  duration = FALSE,
  dur_directed_end = FALSE,
  dur_type_exclusive = FALSE
)

Arguments

edgelist

the relational event history. An object of class data.frame with first three columns corresponding to time, and actors forming the dyad. The first three columns will be re-named "time", "actor1", "actor2" (where, for directed networks, "actor1" corresponds to the sender and "actor2" to the receiver of the relational event). Optional columns that can be supplied are: 'type' and 'weight'. If one or both exist in edgelist, they have to be named accordingly.

directed

logical value indicating whether events are directed (TRUE) or undirected (FALSE). (default value is TRUE)

ordinal

logical value indicating whether only the order of events matters in the model (TRUE) or also the exact timing must be considered in the model (FALSE). (default value is FALSE). If TRUE, then the column "time" of edgelist is still used to extract the order.

model

either "tie" (default) or "actor" oriented modeling. For "tie", the riskset is at the dyad level. For "actor", the model has two sub-processes: a sender rate model (who sends next?) and a receiver choice model (who does the sender choose?). Actor-oriented modeling requires directed=TRUE. The returned object includes sender_riskset, receiver_riskset, and activeN (see @return).

actors

[optional] character vector of actors' names that may be observed interacting in the network. If NULL (default), actors' names will be taken from the input edgelist.

riskset

[optional] character value indicating the type of risk set to process: riskset = "full" (default) consists of all the possible dyadic events given the number of actors (and the number of event types) and it mantains the same structure over time. riskset = "active" considers at risk only the observed dyads and it mantains the same structure over time. riskset = "manual", allows the risk set to have a structure that is user-defined, and it is based on the instructions supplied via the argument manual_riskset. riskset = "active_saturated" extends the active riskset by adding the reverse direction for each observed dyad (if A->B is observed, B->A is also at risk) and includes all event types for each observed actor pair (type column is ignored). This reflects the assumption that observing any interaction between two actors implies both directions and all types are possible.

manual_riskset

[optional] When riskset = "manual", this argument of class data.frame specifies which dyadic riskset to consider through the entire sequence. If observed dyads from the edgelist are missing, they will be automatically be added.

extend_riskset_by_type

logical. FALSE (default). When event types are present (via event_type), controls whether the risk set is expanded over types. If TRUE (default when types are present), each actor pair is duplicated for each event type, so the risk set has size D = N(N-1) \times C (directed) or D = N(N-1)/2 \times C (undirected), and the type column appears in the decoded risk set. If FALSE, event type is treated as a mark on events only and does not expand the risk set: D = N(N-1) (directed) or D = N(N-1)/2 (undirected), and no type column appears in the decoded risk set. This argument is ignored when no event types are present.

event_type

Optional. Either NULL (default) or a single character string giving the name of the column in edgelist that contains event types (marks).

If event_type is NULL, remify() uses edgelist$type if it exists; otherwise events are treated as untyped.

If event_type is a column name, that column is used as the event-type mark. If a column named type already exists and event_type != "type", the existing edgelist$type is overridden (with a warning).

When event types are present (via edgelist$type or event_type), the dyadic risk set is extended over types, i.e., each dyad is duplicated for each event type (dyad \times type).

event_weight

Optional. Either NULL (default) or a single character string giving the name of the column in edgelist that contains event weights.

If event_weight is NULL, remify() uses edgelist$weight if it exists; otherwise events are treated as unweighted (uniform weight = 1).

If event_weight is a column name, that column is used as the event weight. If a column named weight already exists and event_weight != "weight", the existing edgelist$weight is overridden (with a warning). This argument behaves analogously to event_type and applies to both standard and duration (duration = TRUE) models.

origin

[optional] starting time point of the observation period (default is NULL). If it is supplied, it must have the same class of the 'time' column in the input edgelist. If unsupplied, the origin is set to the average waiting time in the sequence subtracted from the time of the first event.

time_units

Character string specifying the time unit for converting time values when 'edgelist$time' is of class Date or POSIXct; ignored for numeric or integer time. Default is "secs".

aggregate_time

Integer >= 1. Event-time aggregated based on unique time points. Keeps every aggregate_time-th unique event time (after time translation) and maps each event time to the next kept time point (i.e., ceiling to the kept grid). This reduces the number of unique time points (and thus memory/computation in later steps).

attach_riskset

Logical. If TRUE, attaches a list riskset_info to the returned remify object. The list contains the effective risk set representation used for estimation (e.g., riskset_idx, dyadIDactive, dictionaries, and basic risk set metadata). This is intended to make the returned object self-describing and easier to inspect/debug.

riskset_decode

Character. Controls how (and whether) the included risk set dyads are decoded and attached in riskset_info$included.

"labels"

Attach a decoded dyad table including actor (and type) labels (e.g., actor1, actor2, and optional type).

"ids"

Attach a decoded dyad table with integer IDs only (e.g., actor1ID, actor2ID, optional typeID, and dyadID).

"none"

Do not attach a decoded dyad table.

riskset_max_decode

Integer. Maximum number of included dyads (i.e., length(riskset_idx) / D_active) for which riskset_decode="labels" is allowed. If the included risk set exceeds this threshold, decoding to labels is skipped (typically falling back to "ids" with a warning) to avoid large memory usage.

event_attributes

Optional character vector of column names in edgelist to retain as additional event-level variables in the returned reh object.

These columns are stored as reh$event_attributes together with the corresponding time, actor1, and actor2 columns (and an internal .event_id). This is useful when downstream functions (e.g., in remstats) need access to event-level marks/attributes/covariates that are not part of the core reh$edgelist produced by remify().

Note: event_attributes does not affect risk set construction or type handling in remify(); it only preserves additional columns for later use. Currently there is no further support yet when event_attributes have been added.

ncores

[optional] number of cores used in the parallelization of the processing functions. (default is 1).

duration

Logical. If TRUE, the edgelist is treated as a duration edgelist (each event has both a start time and an end time) and a remify_durem object is returned instead of a standard remify object. The edgelist must contain an end column (or end_time / duration as alternatives; see .durem_normalize_edgelist). Default FALSE.

dur_directed_end

Logical. Only used when duration = TRUE. If FALSE (default), the end process is undirected: either actor can terminate the event and only a combined dyad-level end rate is modelled. If TRUE, the end process is directed: a who_ended column in the edgelist ("actor1" / "actor2" / NA) records which actor terminated each event, enabling actor-level end-rate models. When who_ended is absent and dur_directed_end = TRUE, actor1 is assumed to terminate all events and a message is issued.

dur_type_exclusive

Logical. Only used when duration = TRUE, when typed events are present and when extend_riskset_by_type = TRUE. If TRUE, an active event of any type is a hard block on starting events of all other types for the same dyad (e.g. two actors cannot start a text conversation while already in a face-to-face conversation). If FALSE (default), types are treated as independent processes and a dyad can be simultaneously active in events of different types. Has no effect when extend_riskset_by_type = FALSE.


remixture

Description

See remixture.

Usage

remixture(reh, stats, random, k = 2L, concomitant = NULL, nrep = 3L, ...)

Arguments

reh

A remify object.

stats

A remstats object.

random

Clustering formula, e.g. ~ (1 | dyad) or ~ (1 + inertia | dyad).

k

Number of latent classes (default 2).

concomitant

Optional concomitant formula for class probabilities.

nrep

Number of random restarts (default 3).

...

Additional arguments passed to remstimate.


rempenalty

Description

See rempenalty.

Usage

rempenalty(
  reh,
  stats,
  approach = c("frequentist", "Bayesian"),
  alpha = 1,
  prior = "horseshoe",
  nfolds = 10L,
  lambda_select = c("1se", "min"),
  ...
)

Arguments

reh

A remify or remify_durem object.

stats

A remstats object.

approach

"frequentist" (glmnet) or "Bayesian" (shrinkem).

alpha

Elastic-net mixing for the frequentist fit: 1 = lasso (default), 0 = ridge.

prior

Shrinkage prior for the Bayesian fit (default "horseshoe").

nfolds

Cross-validation folds (frequentist). Default 10.

lambda_select

Which lambda (frequentist): "1se" (default) or "min".

...

Additional arguments passed to remstimate.


remstats

Description

See remstats.

Usage

remstats(
  reh,
  tie_effects = NULL,
  sender_effects = NULL,
  receiver_effects = NULL,
  start_effects = NULL,
  end_effects = NULL,
  memory = c("full", "window", "decay", "interval"),
  memory_value = NA,
  psi_start = 1,
  psi_end = 1,
  first = 2,
  last = Inf,
  display_progress = FALSE,
  sampling = FALSE,
  samp_num = 10L,
  seed = NULL,
  attr_actors = NULL,
  attr_dyads = NULL
)

Arguments

reh

an object of class "remify" characterizing the relational event history. May also be a remify_durem object for duration relational event models.

tie_effects

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the effects in the tie-oriented model for which statistics are computed, see 'Details' for the available effects and their corresponding statistics

sender_effects

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the effects in the sender activity rate step of the actor-oriented model for which statistics are computed, see ‘Details’

receiver_effects

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the effects in the receiver choice step of model for which statistics are computed, see ‘Details’

start_effects

Formula for the start sub-model statistics. Only used when reh is a remify_durem object (i.e. when remify(..., duration = TRUE) was called). Equivalent to tie_effects but applied to the start process. Only supported for the tie-oriented model.

end_effects

Formula for the end sub-model statistics. Only used when reh is a remify_durem object. Only supported for the tie-oriented model.

memory

The memory to be used. See ‘Details’.

memory_value

Numeric value indicating the memory parameter. Default is NA, which is only valid for memory = "full" (no memory parameter required). See ‘Details’.

psi_start

Numeric. Duration exponent for start-model history weighting. The weight of each past event in the start statistics is event_weight * (end - time + 1)^psi_start. Default 1. Only used when reh is a remify_durem object.

psi_end

Numeric. Duration exponent for end-model history weighting. The weight of each past event in the end statistics is event_weight * (end - time + 1)^psi_end. Default 1. Only used when reh is a remify_durem object.

first

an optional integer value, specifying the index of the first unique time point event in the relational event history for which statistics must be computed (see 'Details'). Default is 2: the first event has no history and is used only to initialize statistics, not to fit the model.

last

an optional integer value, specifying the index of the last unique time point in the relational event history for which statistics must be computed (see 'Details')

display_progress

should a progress bar for the computation of the endogenous statistics be shown (TRUE) or not (FALSE)?

sampling

Logical. If TRUE, statistics are computed using case–control (dyad) sampling rather than the full risk set. Default FALSE. Only supported for a tie model.

samp_num

Integer. Number of dyads to include per event when sampling = TRUE. Must be smaller than or equal to the size of the active risk set. Ignored when sampling = FALSE. Only supported for a tie model.

seed

Optional integer. Random seed used for dyad sampling. Setting this ensures reproducible sampling across calls. If NULL, the current RNG state is used.

attr_actors

optionally, an object of class "data.frame" that contains exogenous attributes for actors (see Details).

attr_dyads

optionally, an object of class data.frame or matrix containing attribute information for dyads (see Details).


remstimate

Description

See remstimate.

Usage

remstimate(
  reh,
  stats,
  approach = c("frequentist", "Bayesian"),
  random = NULL,
  penalty = NULL,
  mixture = NULL,
  engine = "auto",
  bayes = list(),
  seed = NULL,
  ncores = 1L,
  WAIC = FALSE,
  method = NULL,
  ...
)

Arguments

reh

A remify or remify_durem object.

stats

A tomstats, tomstats_sampled, aomstats, or remstats_durem object.

approach

"frequentist" (default) or "Bayesian".

random

One-sided formula for random effects, e.g. ~ (1 | actor1) + (1 | actor2). Fits a GLMM (lme4/glmmTMB, or coxme for ordinal models).

penalty

List of penalisation settings. Frequentist uses glmnet; Bayesian uses shrinkem. Recognised elements: alpha (elastic-net mixing, 1 = lasso (default), 0 = ridge), nfolds (CV folds, default 10), lambda_select ("1se" (default) or "min"), unpenalized / penalized (see below), and prior (shrinkem prior, default "horseshoe"). By default the intercept / baseline structure is left unpenalised: any statistic that is an indicator (all values in {0,1}) is exempt, which covers the overall baseline, the duration start/end process intercepts (baseline.start / baseline.end) and fixed-effect type dummies (e.g. FEtype_*); count and continuous effect statistics are penalised. Adjust this default with two additive controls (both character vectors of statistic names): unpenalized adds names to the exemption, and penalized removes names from it, i.e. forces them back into the penalty even though they are 0/1 indicators (e.g. a p-shift dummy such as psABAB.end that is a genuine effect, not an intercept). penalized takes precedence when a name is given in both. Names must match the model statistics exactly (as printed by the remstats object, e.g. "psABAB.end", not "psABAB"); a name that matches nothing is ignored with a warning.

mixture

List of finite-mixture settings (flexmix). Recognised elements: k (components, default 2), random (clustering formula, e.g. ~ (1 | dyad)), concomitant (optional concomitant formula), nrep (random restarts, default 3). E.g. list(k = 2, random = ~ (1 | dyad)) fits the dyadic latent class model (Lakdawala et al., 2026).

engine

GLMM backend: "glmmTMB" or "lme4"; ordinal models automatically use coxme. The default "auto" selects "glmmTMB" when installed (more robust on the stacked tie-oriented design), otherwise falls back to "lme4".

bayes

List of Bayesian (C++ HMC) controls for basic tie/actor models. Recognised elements: nsim (post-burnin iterations, default 2000), nchains (default 2), burnin (default 1000), thin (default 1), init (initial values, default MLE estimates), L (leapfrog steps, default 50), epsilon (leapfrog step size, default 0.002), prior (list with mean and vcov), and nsimWAIC (WAIC draws, default 100).

seed

Random seed.

ncores

Number of threads (C++ backends). Default 1L.

WAIC

Compute WAIC? Default FALSE.

method

[Deprecated] Legacy argument for backward compatibility. Use approach instead. Accepts "MLE" or "HMC" for basic models.

...

Further arguments passed to the backend. The former top-level knobs (alpha, nfolds, lambda_select, k, concomitant, nrep, nsim, nchains, burnin, thin, init, L, epsilon, prior, nsimWAIC) are deprecated but still accepted here and routed into penalty / mixture / bayes.


remtribute

Description

See remtribute.

Usage

remtribute(
  reh,
  stats = NULL,
  effects = NULL,
  attribute = "type",
  attribute_type = c("nominal", "ordinal", "numeric"),
  attr_actors = NULL,
  memory = "full",
  memory_value = Inf,
  ...
)

Arguments

reh

A remify object whose $edgelist contains the attribute column (carried through via event_type or event_attributes in remify). Accepted for both model = "tie" and model = "actor".

stats

A tomstats object (M x D x p), or NULL. When provided, statistics are subsetted internally to the observed dyad at each event. Ignored when effects is supplied.

effects

A one-sided formula with tie-model effects, e.g. ~ inertia() + reciprocity(). When provided, tomstats is called internally to compute the statistics. This is the recommended interface when reh uses an actor-oriented model, because it avoids the need for a separate tie-oriented reh.

attribute

Character string: column name in reh$edgelist that contains the event attribute to model. Default "type".

attribute_type

The type of the attribute: "nominal" (unordered categories, multinomial logit), "ordinal" (ordered categories, cumulative link model), or "numeric" (continuous, linear regression).

attr_actors

Optional data frame of actor-level covariates, passed to tomstats when effects is used.

memory

Memory type for statistics computation. Passed to tomstats when effects is used. Default "full".

memory_value

Memory parameter value. Passed to tomstats when effects is used.

...

Additional arguments passed to the fitting backend (nnet::multinom, MASS::polr, or stats::glm).


remwindow

Description

See remwindow.

Usage

remwindow(
  reh,
  stats,
  n.windows = 5L,
  window.width = NULL,
  step.size.window = NULL,
  start.point = 1L,
  min.events = 50L,
  approach = c("frequentist", "Bayesian"),
  parallel = FALSE,
  ncores.window = 1L,
  ...
)

Arguments

reh

A remify object.

stats

A tomstats, tomstats_sampled, or aomstats object built on the full reh.

n.windows

Target number of windows in auto mode. Default 5.

window.width

Fixed number of events per window (manual mode).

step.size.window

Events to advance between windows (manual mode only). Default equals window.width.

start.point

First array row to start windowing from. Default 1L.

min.events

Floor on window width (auto and manual).

approach

"frequentist" (default) or "Bayesian", forwarded to remstimate.

parallel

Fit windows in parallel? Default FALSE.

ncores.window

Parallel workers across windows (Unix/macOS only; falls back to sequential with a message on Windows).

...

Further arguments passed to remstimate for every window.


rrankReceive

Description

See rrankReceive.

Usage

rrankReceive(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


rrankSend

Description

See rrankSend.

Usage

rrankSend(consider_type = "ignore")

Arguments

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


same

Description

See same.

Usage

same(variable, attr_actors = NULL, attr_data)

Arguments

variable

string with the name of the column in the attr_actors object for which the statistic has to be computed.

attr_actors

optionally, an object of class data.frame that contains the attribute, see 'Details.'

attr_data

Deprecated argument. Please use 'attr_actors' instead.


select_stats

Description

See select_stats.

Usage

select_stats(
  object,
  tie_effects = NULL,
  sender_effects = NULL,
  receiver_effects = NULL,
  start_effects = NULL,
  end_effects = NULL
)

Arguments

object

a remstats object (of class tomstats, aomstats, or remstats_durem)

tie_effects

character vector of statistic names to keep (tomstats only)

sender_effects

character vector of statistic names to keep (aomstats only)

receiver_effects

character vector of statistic names to keep (aomstats only)

start_effects

character vector of statistic names to keep (remstats_durem only)

end_effects

character vector of statistic names to keep (remstats_durem only)


send

Description

See send.

Usage

send(variable, attr_actors = NULL, scaling = c("none", "std"), attr_data)

Arguments

variable

string with the name of the column in the attr_actors object for which the statistic has to be computed.

attr_actors

optionally, an object of class data.frame that contains the attribute, see 'Details.'

scaling

the method for scaling the statistic. Default is to not scale the statistic. Alternatively, standardization of the statistic per time point can be requested with "std".

attr_data

Deprecated argument. Please use 'attr_actors' instead.


sp

Description

See sp.

Usage

sp(unique = FALSE, scaling = c("none", "std"), consider_type = "ignore")

Arguments

unique

A logical value indicating whether to sum the minimum of events with third actors (FALSE, default) or the number of third actors that create a new, unique shared partner (TRUE). See details for more information.

scaling

the method for scaling the triad statistic. Default is to not scale the statistic but keep the raw 'counts'. Alternatively, standardization of the raw counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


spUnique

Description

See spUnique.

Usage

spUnique()

stack_stats

Description

See stack_stats.

Usage

stack_stats(stats, reh, add_actors = TRUE)

Arguments

stats

A tomstats object (output of remstats() or tomstats()).

reh

A remify object (output of remify::remify()).

add_actors

Logical (default TRUE). When TRUE, two extra columns actor1 (sender label) and actor2 (receiver label) are appended by looking up reh$index$dyad_map_active (or reh$riskset_info$included as a fallback). Set to FALSE to suppress this lookup, e.g. when the riskset has not yet been resolved or for performance reasons.


tie

Description

See tie.

Usage

tie(variable, attr_dyads = NULL, scaling = c("none", "std"), x, variableName)

Arguments

variable

A string specifying the attribute to compute the statistic. If attr_dyads is a data.frame, this refers to the column name in attr_actors. If attr_dyads is a matrix, this corresponds to the name of the exogenous attribute, used to label the statistic in the resulting remstats object.

attr_dyads

A data.frame or matrix containing attribute information for dyads. If attr_dyads is a data.frame, the first two columns should represent "actor1" and "actor2" (for directed events, "actor1" corresponds to the sender, and "actor2" corresponds to the receiver). Additional columns can represent dyads' exogenous attributes. If attributes vary over time, include a column named "time". If attr_dyads is a matrix, the rows correspond to "actor1", columns to "actor2", and cells contain dyads' exogenous attributes.

scaling

The method for scaling the statistic. The default is no scaling. Alternatively, standardization of the statistic per time point can be requested with "std".

x

Deprecated argument. Please use 'attr_dyads' instead.

variableName

Deprecated argument. Please use 'variable' instead.


tie_data

Description

See tie_data.


tie_effects

Description

See tie_effects.

Usage

tie_effects(directed = NULL, endogenous = NULL)

Arguments

directed

logical value. The function outputs all statistics in the tie-oriented model for directed events if true, or all statistics in the tie-oriented model for undirected events if false.

endogenous

logical value. The function outputs all endogenous statistics in the tie-oriented model if true, or all exogenous statistics if false


tomstats

Description

See tomstats.

Usage

tomstats(
  tie_effects,
  reh,
  memory = c("full", "window", "decay", "interval"),
  memory_value = NA,
  first = 2,
  last = Inf,
  display_progress = FALSE,
  sampling = FALSE,
  samp_num = 10L,
  seed = NULL,
  attr_actors = NULL,
  attr_dyads = NULL
)

Arguments

tie_effects

an object of class "formula" (or one that can be coerced to that class): a symbolic description of the tie_effects in the model for which statistics are computed, see 'Details' for the available effects and their corresponding statistics

reh

an object of class "remify" characterizing the relational event history. May also be a remify_durem object for duration relational event models.

memory

The memory to be used. See ‘Details’.

memory_value

Numeric value indicating the memory parameter. Default is NA, which is only valid for memory = "full" (no memory parameter required). See ‘Details’.

first

an optional integer value, specifying the index of the first unique time point event in the relational event history for which statistics must be computed (see 'Details'). Default is 2: the first event has no history and is used only to initialize statistics, not to fit the model.

last

an optional integer value, specifying the index of the last unique time point in the relational event history for which statistics must be computed (see 'Details')

display_progress

should a progress bar for the computation of the endogenous statistics be shown (TRUE) or not (FALSE)?

sampling

Logical. If TRUE, statistics are computed using case–control (dyad) sampling rather than the full risk set. Default FALSE.

samp_num

Integer. Number of dyads to include per event when sampling = TRUE. Must be smaller than or equal to the size of the active risk set. Ignored when sampling = FALSE.

seed

Optional integer. Random seed used for dyad sampling. Setting this ensures reproducible sampling across calls. If NULL, the current RNG state is used.

attr_actors

optionally, an object of class "data.frame" that contains exogenous attributes for actors (see Details).

attr_dyads

optionally, an object of class data.frame or matrix containing attribute information for dyads (see Details).


totaldegreeDyad

Description

See totaldegreeDyad.

Usage

totaldegreeDyad(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by two times the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


totaldegreeReceiver

Description

See totaldegreeReceiver.

Usage

totaldegreeReceiver(
  scaling = c("none", "prop", "std"),
  consider_type = "ignore"
)

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by two times the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


totaldegreeSender

Description

See totaldegreeSender.

Usage

totaldegreeSender(scaling = c("none", "prop", "std"), consider_type = "ignore")

Arguments

scaling

the method for scaling the degree statistic. Default is to not scale the statistic (scaling = "none"). Alternatively, scaling of the raw degree counts by two times the number of past events at time t can be requested with 'prop' or standardization of the raw degree counts per time point can be requested with 'std'.

consider_type

character. Controls how event types are handled: "ignore" (default): aggregate over all event types (one statistic); "separate": compute C type-specific statistics, where the type-c statistic for a dyad reflects past type-c events on that actor pair ; "interact": compute C^2 statistics capturing past-event-type x dyad-type interactions (only meaningful with extend_riskset_by_type=TRUE in remify object). Also accepts FALSE (-> "ignore") and TRUE (-> "separate") for backward compatibility.


userStat

Description

See userStat.

Usage

userStat(x, variableName = NULL)

Arguments

x

Matrix with number of rows equal to the number of events and number of columns equal to the number of dyads in the network (tie-oriented model) or the number of actors in the network (actor-oriented model)

variableName

Optionally, a string with the name of the statistic.