Learn R Programming

MUVR2 (version 0.1.0)

plotPerm: Plot for comparison of actual model fitness vs permutation/resampling

Description

Plots histogram of null hypothesis (permutation/resampling) distribution, actual model fitness and cumulative p-value. Plot defaults to "greater than" or "smaller than" tests and cumulative probability in Student's t-distribution.

Usage

plotPerm(
  actual,
  distribution,
  xlab = NULL,
  side = c("greater", "smaller"),
  type = "t",
  ylab = NULL,
  xlim,
  ylim = NULL,
  breaks = "Sturges",
  pos,
  main = NULL,
  permutation_visual = "none",
  curve = TRUE,
  extend = 0.1,
  multiple_p_shown = NULL,
  show_actual_value = TRUE,
  show_p = TRUE,
  round_number = 4
)

Value

Plot

Arguments

actual

Actual model fitness (e.g. Q2, AUROC or number of misclassifications)

distribution

Null hypothesis (permutation) distribution of similar metric as `actual`

xlab

Label for x-axis (e.g. 'Q2 using real value',"Q2 using distributions","BER" 'AUROC', or 'Misclassifications')

side

Cumulative p either "greater" or "smaller" than H0 distribution (defaults to side of median(H0))

type

c('t','non',"smooth","rank","ecdf")

ylab

label for y-axis

xlim

Choice of user-specified x-limits (if default is not adequate)

ylim

Choice of user-specified y-limits (if default is not adequate)

breaks

Choice of user-specified histogram breaks (if default is not adequate)

pos

Choice of position of p-value label (if default is not adequate)

main

Choice of user-specified plot title

permutation_visual

choice of showing median or mean or none

curve

if add curve or not base on the mid

extend

how many percenrtage of the orignical range do we start

multiple_p_shown

show many p values

show_actual_value

show the actual value on the vertical line or not

show_p

if p value is added to the figure

round_number

How many digits does it keep

Examples

Run this code
data("freelive2")
actual <- sample(YR2, 1)
distribution <- YR2
plotPerm (actual, distribution)

Run the code above in your browser using DataLab