Simulation from a weighted sum of non-central chi squared random variables and Monte Carlo approximation of its distribution function.
r_wschisq_Cpp(n, weights, dfs, ncps)p_wschisq_MC(x, weights = 0L, dfs = 0L, ncps = 0L, M = 10000L,
sample = 0L, use_sample = FALSE, x_sorted = FALSE)
r_wschisq_Cpp: a matrix of size c(n, 1)
containing a random sample.
p_wschisq_MC: a matrix of size c(nx, 1)
with the evaluation of the distribution function at x.
sample size.
vector with the positive weights of the sum. Must have the
same length as dfs.
vector with the positive degrees of freedom of the chi squared
random variables. Must have the same length as weights.
non-negative non-centrality parameters. A vector with the same
length as weights.
vector of quantiles.
number of Monte Carlo samples for approximating the distribution.
Defaults to 1e4.
if use_sample = TRUE, the Monte Carlo sample to
approximate the distribution. If not, it is computed internally. Defaults
to 1e4.
use the already computed sample? If FALSE
(default), sample is computed internally.