plotUtility: Plot a utility function.

Description Usage Arguments Examples

Description

Plot the utility function.

Usage

1
2
3
4
plotUtility(my_title, my_title_colour, my_title_font_size, my_x_label, xmin,
  xmax, my_y_label, fun, par, fun_colour, draw_reference_line_flag,
  reference_line_colour, reference_line_style, my_labels, my_label_positions,
  my_label_colours, my_label_font_sizes)

Arguments

my_title

text, the title of the chart.

my_title_colour

text, the title colour.

my_title_font_size

numeric, the title font size.

my_x_label

text, the x-axis label.

xmin

numeric, the xmin on the x-axis.

xmax

numeric, the xmax on the x-axis.

my_y_label

text, the y-axis label.

fun

Utility, an instance of the Utility class.

par

vector, the parameters for the utility function.

fun_colour

text, the colour of the utility function line.

draw_reference_line_flag

logical, a boolean flag determining whether or not to draw a y=x reference line.

reference_line_colour

text, the reference line colour.

reference_line_style

numeric, the reference line style.

my_labels

vector, a vector of text labels to draw.

my_label_positions

list, a list of coordinates for the text labels.

my_label_colours

vector, stores the colours for each text label.

my_label_font_sizes

vector, stores the font size of each text label.

Examples

1
2
3
4
5
6
7
8
9
plotUtility(my_x_label = "objective consequence",
	my_y_label = "subjective value",
	xmin = -10, xmax = 10,
	fun=power_uf,
	par=c(alpha = 0.88, beta = 0.88, lambda = 2.25),
	fun_colour = "purple",
	draw_reference_line_flag = TRUE,
	reference_line_colour = "red",
	reference_line_style = 1)

gary-au/pt documentation built on May 16, 2019, 5:41 p.m.