tests/exp_weights_tests.R

# Unit tests for Exp weights

source("./R/exp_weights.R")

# Plots  ----------------
# generate means
J <- 2000
mu <- -abs(rnorm(J))
beta <- 4
q <- 5 #change to 5 if desired

# find weights
w_1 <- exp_weights(mu, beta, q)
plot(mu, w_1)
dobriban/pweight documentation built on May 15, 2019, 9:42 a.m.