View source: R/plot_functions.R
plot.ddt_lcm | R Documentation |
Create trace plots of DDT-LCM parameters
## S3 method for class 'ddt_lcm'
plot(
x,
parameter_names = c("responseprob_1,1,1", "classprob_1", "c", "diffusionvar_1"),
burnin = 50,
...
)
x |
a "ddt_lcm" object |
parameter_names |
a character vector to specify the parameters to be plotted. Each element can take the be 1) of format "parameter_index" to plot specific parameters with specific indices, 2) of format "parameter" to plot the parameters across all indices, or 3) equal to "all" to plot all parameters in the model. For 1), the item response probabilities should be named "responseprob_class,group,item"; the class probabilities should be named "classprob_class"; the divergence function parameter is "c"; the group-specific diffusion variances should be named "diffusionvar_group". For 2), "responseprob" to plot all item response probabilities; "classprob" to plot all class probabilities; "diffusionvar" to plot all diffusion variances. |
burnin |
the number of posterior samples as burn-in, which will not be plotted. |
... |
Further arguments passed to each method |
NULLs
data(result_diet_1000iters)
# Plot "c" for the divergence function parameter; "diffusionvar_1" for diffusion variance of group 1
plot(x = result_diet_1000iters, parameter_names = c("c", "diffusionvar_1"), burnin = 500)
# Plot "responseprob_1,1,1" for the class 1 response probability of item 3 in major group 2
plot(x = result_diet_1000iters, parameter_names = "responseprob_1,1,1", burnin = 500)
# Plot "classprob_1" for the probability of being assigned to class 1
plot(x = result_diet_1000iters, parameter_names = "classprob_1", burnin = 500)
# plot all class probabilities
plot(x = result_diet_1000iters, parameter_names = "classprob", burnin = 500)
# plot all diffusion variances
plot(x = result_diet_1000iters, "diffusionvar", burnin = 500)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.