joint | R Documentation |
The bivariate joint distributions are described in terms of two marginal distributions and a copula
rjoint(n, copula, marginal_1, marginal_2) djoint(x, copula, marginal_1, marginal_2) pjoint(q, copula, marginal_1, marginal_2)
n |
integer value, the number of random samples to be
generated with |
copula |
R object of class ' |
marginal_1 |
named list (for parametric estimates) or
a ' |
marginal_2 |
This input is similar to |
x |
matrix (or vector) of numeric values giving the points (in 2 dimensions) where the density function is evaluated. |
q |
matrix (or vector) of numeric values giving the points (in 2 dimensions) where the distribution function is evaluated. |
If entered "by hand", the named lists describing the parametric distributions
(marginal_1
and marginal_2
) must contain 2 entries:
name
:
a character string denoting the name of the distribution.
For a circular distribution, it can be "vonmises"
, "vonmisesmix"
, or
"wrappedcauchy"
. For a linear distribution, it must be a
string denoting the name of a linear distribution in the environment, i.e. the name of its
distribution function without the "p",
e.g. "norm" for normal distribution
coef
: For a circular distribution coef
is a (named) list of
parameters of the circular
marginal distribution as taken by the functions
qvonmises()
, qvonmisesmix()
,
or qwrappedcauchy()
. For a linear distribution, coef
is
a named list containing the parameters of the distribution given in "name"
.
djoint()
gives a vector of length length(x)
containing the density at x
.
pjoint()
gives a
vector of length length(q)
containing
the distribution function at the corresponding values of q
.
rjoint()
generates a vector of length n
containing the random samples.
cop <- copula::normalCopula(0.6) marginal_1 <- list(name="exp",coef=list(rate=2)) marginal_2 <- list(name="lnorm", coef=list(0,0.1)) sample <- rjoint(10,cop,marginal_1,marginal_2) pjoint(sample,cop,marginal_1,marginal_2) djoint(sample,cop,marginal_1,marginal_2) cop <- cyl_quadsec() marginal_1 <- list(name="wrappedcauchy", coef=list(location=0,scale=0.3)) marginal_2 <- list(name="weibull",coef=list(shape=3)) sample <- rjoint(10,cop,marginal_1,marginal_2) marginal_1 <- fit_angle(theta=sample[,1], parametric=FALSE) marginal_2 <- fit_steplength(x=sample[,2],parametric="lnorm") pjoint(c(0.3*pi,4),cop,marginal_1,marginal_2) djoint(c(0,2),cop,marginal_1,marginal_2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.