varkernelslicerange: Estimated output variable values given the expected values of...

View source: R/varkernelslicerange.R

varkernelslicerangeR Documentation

Estimated output variable values given the expected values of the influencing variable, based on a slice of 'z' from the Kernel density plot of the influencing variable and output variable data.

Description

Plot representing probabilities (shown along the y-axis) for the expected outcome variable (shown along the x-axis). This is a broad slice through the density kernel from uncertainty::varkernel() function, which integrates to 1, the probability values are relative, not absolute measures.

Usage

varkernelslicerange(
  in_var,
  out_var,
  min_in_var,
  max_in_var,
  xlab_vars = "Outcome variable dist. given influence variable"
)

Arguments

in_var

is a vector of observations of a given influencing variable corresponding to another list with observed values of an outcome variable out_var.

out_var

is a vector of observed values of an outcome variable corresponding to another list with observations of a given influencing variable in_var.

min_in_var

is a value of the lowest expected amount of in_var for which the outcome variable out_var should be estimated (must be < max_in_var).

max_in_var

is a value of the highest expected amount of a given influencing variable in_var for which the outcome variable out_var should be estimated (must be > min_in_var).

xlab_vars

is the x axis title that describes the two variables being associated

Examples

variable <- sample(x = 1:50, size = 20, replace = TRUE)
outcome <- sample(x = 1000:5000, size = 20, replace = TRUE)
varkernelslicerange(variable, outcome, 10, 20, 
xlab_vars = "Dist. of outcome given influence variable range")


CWWhitney/uncertainty documentation built on June 14, 2022, 10:21 p.m.