The Plot of the Expected Rank from a JAGS model
plotting_er_results.Rd
This function plot the results form the JAGS-ER
Usage
plotting_er_results(
er_results,
id_proposal = "id_proposal",
how_many_fundable = NULL,
title = "",
ordering_increasing = TRUE,
draw_funding_line = TRUE,
result_show = TRUE,
easy_numbering = TRUE,
no_pm_available = FALSE,
colors = NULL,
pt_size = 1,
line_size = 0.5,
alpha_line = 1,
alpha_pt = 1,
line_type_fl = "longdash",
x_expand = 0.6,
alpha_fl = 0.5,
color_fl = "darkgray",
size_fl = 2,
padding_right = 0.3,
padding_left = 0.1,
grep_size = 2,
nudge_x = 0.5,
min_segment_length = 0,
segment_curvature = -0.1,
segment_angle = 20,
segment_ncp = 3,
segment_size = 0.15,
hjust_y_axis = 1.5
)
Arguments
- er_results
the resulting object from the `get_er_from_jags()` function
- id_proposal
the name of the variable giving the distinct application identifiers. (default = id_proposal)
- how_many_fundable
number of proposals that can be funded? (default = NULL) If Null, the graph will be black and white only
- title
beginning of the plot title (default = " ").
- ordering_increasing
should the order of the rank be increasing, from up to dowm: from rank 1 on top to rank n on the bottom (default = TRUE)
- draw_funding_line
should the funding line be drawn? (default = TRUE)
- result_show
boolean telling us whether the application number/id should be added next to the ER points (default = FALSE).
- easy_numbering
should the ER results just be numbered? (default = TRUE)
- no_pm_available
has the posterior mean not been computed? (default = FALSE, e.g. it has been computed and is in the object)
- colors
a color pallette that can be changes.
- pt_size
size of points (default = 1)
- line_size
size of the lines (default = 0.5)
- alpha_line
...
- alpha_pt
...
- line_type_fl
... fl = funding line
- x_expand
make funding line longer on both sides (default = .3)
- alpha_fl
...
- color_fl
...
- size_fl
...
- padding_right
for ggrepel
- padding_left
for ggrepel
- grep_size
the size of the labels on the points (default = .25).
- nudge_x
element of ggrepel.
- min_segment_length
...
- segment_curvature
...
- segment_angle
...
- segment_ncp
...
- segment_size
...
- hjust_y_axis
...
Examples
dat <- get_mock_data() %>%
filter(panel == "p1")
if (FALSE) {
ER_results <- get_er_from_jags(data = dat,
id_proposal = "proposal",
id_assessor = "assessor",
grade_variable = "num_grade",
n_chains = 2, n_iter = 1000,
n_burnin = 1000)
plotting_er_results(ER_results, title = "Panel 1", how_many_fundable = 5)
}