powered by
Extract the values over time of a variable from a Stan fit
extract_timeseries_var(var_name, posterior_df)
A data frame
A string that indicates the variable's name for which the function will construct the timeseries.
A Stan fit object converted into a data frame
posterior_df <- data.frame(`var[1]` = rep(0, 2), `var[2]` = rep(1, 2), check.names = FALSE) extract_timeseries_var("var", posterior_df)
Run the code above in your browser using DataLab