vfploto {vfcp} | R Documentation |
Plotting the cumulative distribution function or survival function
Description
Plotting the cumulative distribution function or survival function.
Usage
vfploto(cx, pro, fam, marg, xo, tht, cdf=TRUE, plt=TRUE, rtn=FALSE,
ped = TRUE)
Arguments
cx |
A vector of copula probabilities. | |||||
pro |
Numeric vector. Its | |||||
fam |
character; A name of copula. One of c("clayton", "frank", "gumbel", "amh", "joe", "fgm"). "amh", "joe", "fgm" names are for Ali-Mikhail-Haq, Joe, Farlie-Gumbel-Morgenstern copulas. | |||||
marg |
A vector size 2. Combination of these marginals: | |||||
xo |
A vector of marginal distribution parameters. It is size 4
with these components:
| |||||
tht |
copula parameter | |||||
cdf |
logical; Computation for CDF when TRUE. If FALSE is the same for Survival. | |||||
plt |
Plot only when TRUE. | |||||
rtn |
Print output value only when TRUE. | |||||
ped |
Compute and add to plot an expected values o f marginal
distributions when |
Details
Must not be plt
and rtn
at the same time equal to FALSE.
Value
If rtn
is TRUE, then a list of these components:
Type | character; "CDF" or "Survival" |
P | numeric; CDF or Survival value |
x | numeric vector of the first marginal values for P |
y | numeric vector of the second marginal values for P |
u | numeric vector of the first copula marginal values |
v | numeric vector of the second copula marginal values |
Author(s)
Josef Brejcha
Examples
require(copula)
tht = 0.475
cx = c(0.0025, 0.05, seq(0.1, 0.9, 0.1), 0.95, 0.975)
# nC = length(cx)
proh = c(0.9999999, 8, 4, 4, 4)
prod = c(0.999, 8, 4, 4, 4)
fam = "clayton"
marg = c("weibull", "lnorm")
xo = c(100, 1.5, 3, 0.425)
suro = vfploto(cx, proh, fam, marg, xo, tht, cdf=FALSE, plt=TRUE, rtn=FALSE)
cdfo = vfploto(cx, prod, fam, marg, xo, tht, cdf=TRUE, plt=TRUE, rtn=FALSE)
##
cx = 0.4
vfploto(cx, proh, fam, marg, xo, tht, cdf=TRUE, plt=FALSE, rtn=TRUE,
ped = TRUE)