Description Usage Arguments Value Author(s) See Also Examples
coda_df
takes as input an mcmc.list object and converts it to a
dataframe with a column for each monitored parameter and two indicator
columns, one giving the chain number and another giving the iteration
number within that chain.
1 |
coda.object |
an mcmc.list object |
parameters |
character vector of parameter names to include in dataframe. If none are supplied all monitored parameters are included. |
A dataframe
Michael Malick
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | library(coda)
data(line)
df <- coda_df(line)
head(df)
tail(df)
df <- coda_df(line, parameters = "alpha")
head(df)
df <- coda_df(line, parameters = c("alpha", "beta"))
head(df)
df <- coda_df(line, parameters = grep("sig", coda::varnames(line), value = TRUE))
head(df)
df <- coda_df(line, parameters = grep("a", coda::varnames(line), value = TRUE))
head(df)
df <- coda_df(line, parameters = c("alpha", grep("sig", coda::varnames(line),
value = TRUE)))
head(df)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.