| extract_latent_state | R Documentation |
Extracts a time-varying latent state from a list of stan output and returns
it as a <data.table>.
extract_latent_state(param, samples, dates)
param |
Character string indicating the latent state to extract |
samples |
Extracted stan model (using |
dates |
A vector identifying the dimensionality of the latent state to extract. Generally this will be a date. |
A <data.frame> containing the following columns:
Integer index (1..N) corresponding to the position in the supplied dates vector. This is the row/time-step index that maps to the date column
The date corresponding to this time step
Integer sample ID from the posterior
Numeric value of the parameter sample
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.