margins {copulaedas} | R Documentation |
Marginal Distributions
Description
Functions that implement marginal distributions.
Usage
fnorm(x, lower, upper)
ftruncnorm(x, lower, upper)
fkernel(x, lower, upper)
pkernel(q, X, h)
qkernel(p, X, h)
ftrunckernel(x, lower, upper)
ptrunckernel(q, a, b, X, h)
qtrunckernel(p, a, b, X, h)
Arguments
x , q |
Vector of quantiles. |
lower , a |
Lower bound of the variable. |
upper , b |
Upper bound of the variable. |
p |
Vector of probabilities |
X |
Observations of the variable. |
h |
Bandwidth of the kernel. |
Details
The functions fnorm
, pnorm
, and qnorm
implement the normal marginal distributions for EDAs with the margin
parameter set to "norm"
. The fnorm
function fits the parameters,
it returns a list
object with the mean (mean
component) and
the standard deviation (sd
component). These components determine the
values of the corresponding arguments of the pnorm
and
qnorm
functions.
The functions ftruncnorm
, ptruncnorm
, and
qtruncnorm
implement the normal marginal distributions for
EDAs with the margin
parameter set to "truncnorm"
. The
ftruncnorm
function fits the parameters, it returns a list
object with the lower and upper bounds (a
and b
components,
respectively), the mean (mean
component) and the standard deviation
(sd
component). These components determine the values of the
corresponding arguments of the ptruncnorm
and
qtruncnorm
functions.
The functions fkernel
, pkernel
, and qkernel
implement the kernel-smoothed empirical marginal distributions for EDAs
with the margin
parameter set to "kernel"
. The fkernel
function fits the marginal distribution, it returns a list
object with
the observations of the variable (X
component) and the bandwidth of a
Gaussian kernel density estimator (h
component). The bandwidth is
calculated using Silverman's rule of thumb (see bw.nrd0
).
The components of the list
object returned by fkernel
are used
as aditional arguments in the pkernel
and qkernel
functions.
The pkernel
function calculates the empirical cumulative distribution
function. The expression of the empirical cumulative distribution function
includes the modification used in the copula context to avoid problems
in the boundary of the [0,1]
interval. The qkernel
function uses
the Gaussian kernel density estimator fitted by fkernel
to evaluate the
inverse of the cumulative distribution function, following the procedure
suggested in (Azzalini 1981).
The functions ftrunckernel
, ptrunckernel
, and qtrunckernel
implement the truncated kernel-smoothed empirical marginal distributions for
EDAs with the margin
parameter set to "trunckernel"
. The
distribution is computed from the corresponding kernel-smoothed empirical
marginal distributions without truncation by following the procedure
illustrated in (Nadarajah and Kotz 2006).
References
Azzalini, A (1981) A Note on the Estimation of a Distribution Function and Quantiles by a Kernel Method, Biometrika, 68, 326-328.
Gonzalez-Fernandez Y, Soto M (2014). copulaedas: An R Package for Estimation of Distribution Algorithms Based on Copulas. Journal of Statistical Software, 58(9), 1-34. http://www.jstatsoft.org/v58/i09/.
Nadarajah S, Kotz S (2006) R Programs for Computing Truncated Distributions, Journal of Statistical Software, 16, Code Snippet 2.
See Also
pnorm
,
qnorm
,
ptruncnorm
,
qtruncnorm
.