plot_boxplots: Plot boxplots

Description Usage Arguments Author(s) References See Also

View source: R/visualization.R

Description

This function creates boxplots for single-value metrics resulting from error propagation in geographically weighted regression. It is useful for comparing the results of different simulations from the same GWR model, for example, using different errors.

Usage

1
2
plot_boxplots(data, names, range = 1.5, plot_original = TRUE,
  horizontal = FALSE, print_file = TRUE, margins = c(5, 4, 4, 2) + 0.1)

Arguments

data

output from the function epgwr_mc; for multiple results, use list(data1, data2, data3...) where data1 etc. are the results from the function epgwr_mc

names

a vector of names for different simulations, for example names=c("large error", "small error", "spatial autocorrelation")

range

this determines how far the plot whiskers extend out from the box; ff range is positive, the whiskers extend to the most extreme data point which is no more than range times the interquartile range from the box; a value of zero causes the whiskers to extend to the data extremes

plot_original

TRUE (default) for plotting original value to the box plot as a red line; if using multiple simulation results, this will be taken from the first result, so make sure the original GWR cases are all the same

horizontal

logical indicating if the boxplots should be horizontal; default FALSE means vertical boxes

print_file

TRUE (default) for creating .png images and saving them to disk, FALSE for just showing boxplots in R plot device one at a time

margins

the parameter mar which is a numerical vector of the form c(bottom, left, top, right) which gives the number of lines of margin to be specified on the four sides of the plot; the default is c(5, 4, 4, 2) + 0.1.

Author(s)

Jaakko Madetoja

References

Madetoja, J. (2018). Error propagation in geographically weighted regression. (Doctoral dissertation, Aalto University). Manuscript in preparation.

See Also

epgwr_mc


jaakkomadetoja/epgwr documentation built on May 28, 2019, 8:57 p.m.