Learn R Programming

remstats (version 4.1.0)

event: event

Description

Specifies the statistic for an "event" effect in the tie-oriented model. An "event" effect refers to an exogenous event attribute that affects the waiting time between events.

Usage

event(variable, event_attr)

Value

List with all information required by `remstats::remstats()` to compute the statistic.

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

Details

Because the statistics array is indexed by unique timepoint rather than by event, multiple events occurring at the same time must be collapsed to a single value; the average of the event attribute is taken over these events.

See Also

FEtype

Examples

Run this code
# \donttest{
  reh_tie <- remify::remify(history, model = "tie", event_attr = "setting")
  data(history, package = "remstats")
  history$work <- ifelse(history$setting == "work", 1, 0)
  effects <- ~ event("work", event_attr = history)
  remstats(reh = reh_tie, tie_effects = effects)
# }

Run the code above in your browser using DataLab