| wschisq_utils | R Documentation |
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)
n |
sample size. |
weights |
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 |
ncps |
non-negative non-centrality parameters. A vector with the same
length as |
x |
vector of quantiles. |
M |
number of Monte Carlo samples for approximating the distribution.
Defaults to |
sample |
if |
use_sample |
use the already computed |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.