R/RcppExports.R
door_ema.Rd
Door EMA smoothing across units
door_ema(conn_counts, unit_row_indices, alpha = 0.1, segment_ids = integer())
Numeric matrix of connection counts
List of integer vectors of row indices
Smoothing factor
Optional integer vector of segment IDs
counts <- matrix(c(10, 0, 0, 10, 10, 0, 0, 10), nrow = 4, byrow = TRUE) door_ema(counts, list(c(0L, 1L), c(2L, 3L)), alpha = 0.5) #> [,1] [,2] #> [1,] 10 0 #> [2,] 5 5 #> [3,] 10 0 #> [4,] 5 5