Learn R Programming

optinterv (version 0.1.0)

per_distance: Distance Between Distributions

Description

Calculate distance in RMSE between quantiles of distributions

Usage

per_distance(x, n.quant, wgt, wgt1, p = 2/3, plot.sign = F)

Arguments

x

variable.

n.quant

number of quantiles.

wgt

original weights.

wgt1

weights under I = 1.

p

proportion of quantiles that need to be increase (decrease) in order to return a positive (negative) sign.

plot.sign

if F returns RMSE, if T returns the sign of effect.

Value

scalar for distance. If sign = TRUE, returns +1 (-1) for increasing (decreasing) p of quantiles. Else returns 0