Learn R Programming

BivarP (version 1.0)

subivar: Survival function values based the Archimedean copula

Description

Computes the survival function values based the Archimedean copula on the grid of x and y vectors.

Usage

subivar(x, y, par, afa, rodina, fam)

Arguments

x
numeric vector
y
numeric vector
par
vector of this values: par[1], par[3] are shape for the Weibull and the Gamma distributions or mean for the Normal distribution or meanlog for the Lognormal ditribution. par[2], par[4] are scale for the Weibull and the Gamma distributions or sd for the Normal distribution or sdlog for the Lognormal ditribution.
afa
copula parameter
rodina
vector of length 2 of names of the marginal distributions. Distributions can be "weibull", "gamma", "norm", "lnorm". "norm" is the name for the Normal distribution. "lnorm" is the name for the Lognormal distribution.
fam
name of copula. It can be "gumbel", "clayton", "frank".

Value

Returns an array of values of the survival function.

Examples

Run this code
x <- seq(0, 100, 5)
y <- seq(0, 100, 4)
Sxy <- subivar(x, y, c(1.5, 50, 1.3, 50), 5, c("weibull", "weibull"), "gumbel")
colnames(Sxy) <- x
rownames(Sxy) <- y
contour(y, x, Sxy, xlab="y", ylab="x")

Run the code above in your browser using DataLab