Description Usage Arguments Author(s) Examples
This function will plot the posterior densities for population-level and individual-level preferences based upon a bayesPref
analysis.
1 2 3 |
prefres |
An object returned by |
burn |
A value indicating the number of burnin samples discarded. |
ind |
A boolean indicating whether to plot individual-level preferences. |
pop |
A boolean indicating whether to plot population-level preferences. |
dist |
A boolean indicating whether to plot population-level preferences based on density of the posterior (default), or whether to plot population-level preferences based on the estimate of the Dirichlet alphas. |
ymax |
A value indicating the maximum value for the y-axis. |
xmin |
A value indicating the minimum value for the x-axis. |
xmax |
A value indicating the maximum value for the x-axis. |
dadj |
A value indicating the bandwidth used for the smoothing of the density plot. |
colors |
A vector indicating the colors used for plotting. |
leg |
A Boolean indicating whether to include a legend in the plot. |
lx |
A value indicating where the legend begins on the horizontal (x-axis). |
ly |
A value indicating where the legend begins on the vertical (y-axis). |
catname |
A vector indicating the names associated with the legend. |
ps |
A Boolean indicating whether to write the plot to a file. |
file |
The name of the file the plot is written to. |
Zachariah Gompert zgompert@uwyo.edu, James A. Fordyce jfordyce@utk.edu
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
data(YGGV)
res <- bayesPref(pData=YGGV,mcmcL=1000)
prefPlot(prefres=res[[1]],burn=100,pop=TRUE)
prefPlot(prefres=res[[1]],burn=100,pop=TRUE,ymax=15,leg=TRUE,
catname=c("Astragalus"," Lotus","Lupine","Medicago"),lx=0.6,ly=14) #includes legend
prefPlot(prefres=res[[1]],burn=100,ind=FALSE,pop=TRUE,ymax=15,leg=TRUE,
catname=c("Astragalus"," Lotus","Lupine","Medicago"),lx=0.6,ly=14) #includes only
population posterior and legend
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.