View source: R/sufficient_stats.R
| init_accumulator | R Documentation |
Allocates a zero-filled accumulator with the correct dimensions to receive
batched calls to accumulate_stats(). Use this once before a
streaming loop over data batches or nodes.
init_accumulator(p, q)
p |
Integer. Number of fixed-effects columns (intercept plus spline basis). |
q |
Integer. Number of random-effects columns (length of alpha). |
A list of class "vcmm_accumulator" with the same six
matrix slots as compute_sufficient_stats(), all initialised to
zero, plus n_obs = 0L.
Other sufficient statistics:
accumulate_stats(),
compute_sufficient_stats()
acc <- init_accumulator(p = 5, q = 3)
dim(acc$C) # 5 x 5
dim(acc$ZtZ) # 3 x 3
acc$n_obs # 0
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.