| Title: | Bivariate Chen Distribution: Density, Survival, Hazard, Plots and Estimates |
|---|---|
| Description: | Probability density, survival and hazard functions, random generation, graphical displays and maximum likelihood estimation for bivariate Chen type models. Three constructions are covered: the Bivariate Chen distribution with a singular component on the diagonal, the Bivariate Extended Chen distribution, and the Bivariate Inverse copula Chen distribution obtained through an inverse copula with Chen marginals. Univariate Chen density, distribution, quantile, survival, hazard and random generation routines are obtained from the 'reliaR' package. |
| Authors: | Mukul Bijalwan [aut] (Orchid ID: https://orcid.org/0009-0001-3040-6912), Puneet Kumar Gupta [aut, cre] |
| Maintainer: | Puneet Kumar Gupta <[email protected]> |
| License: | GPL-3 |
| Version: | 0.1.0 |
| Built: | 2026-10-22 10:13:09 UTC |
| Source: | https://github.com/puneetstat999/bvch |
Probability density, survival function, hazard function and random
generation for the Marshall-Olkin type Bivariate Extended Chen
distribution .
dbec(x1, x2, alpha1, alpha2, alpha3, beta, lambda, log = FALSE) sbec(x1, x2, alpha1, alpha2, alpha3, beta, lambda) hbec(x1, x2, alpha1, alpha2, alpha3, beta, lambda) rbec(n, alpha1, alpha2, alpha3, beta, lambda)dbec(x1, x2, alpha1, alpha2, alpha3, beta, lambda, log = FALSE) sbec(x1, x2, alpha1, alpha2, alpha3, beta, lambda) hbec(x1, x2, alpha1, alpha2, alpha3, beta, lambda) rbec(n, alpha1, alpha2, alpha3, beta, lambda)
x1, x2
|
numeric vectors of first and second component. |
alpha1, alpha2, alpha3, beta, lambda
|
positive parameters. |
log |
logical; if |
n |
number of observations. |
With independent and
, , the joint survival
function is
where
(see sech). The joint density is
with
The three regions carry mass ,
so the density integrates to one. The hazard function is ,
The componentwise hazard gradients are available separately through
hbec1 and hbec2.
A numeric vector, or for rbec a two column matrix with
columns x1 and x2.
sbec, hbec, rbec,
fitbec, sech
dbec(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) sbec(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) hbec(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) set.seed(1) rbec(5, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2)dbec(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) sbec(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) hbec(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) set.seed(1) rbec(5, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2)
Probability density, survival function, hazard function and random
generation for the Marshall-Olkin type Bivariate Chen distribution
.
dbvch(z1, z2, alpha1, alpha2, alpha3, beta, log = FALSE) sbvch(z1, z2, alpha1, alpha2, alpha3, beta) hbvch(z1, z2, alpha1, alpha2, alpha3, beta) rbvch(n, alpha1, alpha2, alpha3, beta)dbvch(z1, z2, alpha1, alpha2, alpha3, beta, log = FALSE) sbvch(z1, z2, alpha1, alpha2, alpha3, beta) hbvch(z1, z2, alpha1, alpha2, alpha3, beta) rbvch(n, alpha1, alpha2, alpha3, beta)
z1, z2
|
numeric vectors of first and second component. |
alpha1, alpha2, alpha3, beta
|
positive parameters. |
log |
logical; if |
n |
number of observations. |
Let , , be
independent and set , .
Then the joint survival function is
where . Each factor is obtained from
schen. The joint density is piecewise,
with
The mass carried by the three regions is respectively
,
and
, so the density integrates to
one. The hazard function is the ratio , that is
The model is a mixture (Proposition 1) of an absolutely continuous part
of weight and a
singular part of weight
supported on the diagonal; see dbvch_ac and
dbvch_sing.
A numeric vector, or for rbvch a two column matrix with
columns z1 and z2.
sbvch, hbvch, rbvch,
fitbvch, plot_surface_bvch
dbvch(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) sbvch(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) hbvch(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) set.seed(1) rbvch(5, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8)dbvch(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) sbvch(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) hbvch(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) set.seed(1) rbvch(5, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8)
Decomposition of the Bivariate Chen density into the two components of the
mixture representation
.
dbvch_ac(z1, z2, alpha1, alpha2, alpha3, beta) dbvch_sing(z1, z2, alpha1, alpha2, alpha3, beta)dbvch_ac(z1, z2, alpha1, alpha2, alpha3, beta) dbvch_sing(z1, z2, alpha1, alpha2, alpha3, beta)
z1, z2
|
numeric vectors of first and second component. |
alpha1, alpha2, alpha3, beta
|
positive parameters. |
dbvch_ac is the properly normalised absolutely continuous
component of Proposition 1; it integrates to one over the plane, and
dbvch_sing integrates to one along the diagonal. Consequently
dbvch is recovered exactly as
(alpha1 + alpha2)/(alpha1 + alpha2 + alpha3) * dbvch_ac(...) plus
alpha3/(alpha1 + alpha2 + alpha3) * dbvch_sing(...).
A numeric vector.
a <- 1.5; b2 <- 2.5; c3 <- 0.5; bt <- 1.8 zz1 <- c(0.4, 0.9, 0.7); zz2 <- c(0.6, 0.4, 0.7) ac <- dbvch_ac(zz1, zz2, a, b2, c3, bt) sg <- dbvch_sing(zz1, zz2, a, b2, c3, bt) k <- (a + b2 + c3) mix <- (a + b2) / k * ac + c3 / k * sg all.equal(mix, dbvch(zz1, zz2, a, b2, c3, bt))a <- 1.5; b2 <- 2.5; c3 <- 0.5; bt <- 1.8 zz1 <- c(0.4, 0.9, 0.7); zz2 <- c(0.6, 0.4, 0.7) ac <- dbvch_ac(zz1, zz2, a, b2, c3, bt) sg <- dbvch_sing(zz1, zz2, a, b2, c3, bt) k <- (a + b2 + c3) mix <- (a + b2) / k * ac + c3 / k * sg all.equal(mix, dbvch(zz1, zz2, a, b2, c3, bt))
Density, distribution function, quantile function, random generation,
survival and hazard function for the univariate Chen distribution with
shape parameter beta and scale parameter lambda.
dchen(x, beta, lambda, log = FALSE) pchen(q, beta, lambda, lower.tail = TRUE, log.p = FALSE) qchen(p, beta, lambda, lower.tail = TRUE, log.p = FALSE) rchen(n, beta, lambda) schen(x, beta, lambda) hchen(x, beta, lambda) hra.chen(x, beta, lambda) crf.chen(x, t = 0, beta, lambda)dchen(x, beta, lambda, log = FALSE) pchen(q, beta, lambda, lower.tail = TRUE, log.p = FALSE) qchen(p, beta, lambda, lower.tail = TRUE, log.p = FALSE) rchen(n, beta, lambda) schen(x, beta, lambda) hchen(x, beta, lambda) hra.chen(x, beta, lambda) crf.chen(x, t = 0, beta, lambda)
x, q
|
vector of quantiles. |
beta |
shape parameter. |
lambda |
scale parameter. |
log, log.p
|
logical; if |
lower.tail |
logical; if |
p |
vector of probabilities. |
n |
number of observations. |
t |
age component for the conditional reliability function. |
These are the reliaR implementations, re-exported by BvCh so that the Chen building blocks used in the bivariate formulae are available without attaching a second package. The density is
and the survival function is
Taking gives the that
appears in the bivariate Chen formulae.
dchen gives the density, pchen the distribution
function, qchen the quantile function, rchen random
deviates, schen the survival function and hchen the hazard
function.
rchen is not a direct call to rchen.
In reliaR 0.2 that function does not agree with the package's own
distribution, quantile and survival functions: for ,
its output has Kolmogorov-Smirnov distance about 0.38 from
pchen (), and the discrepancy grows with
(distance about 0.85 at ); it happens to be
correct only when . Since qchen is the verified
analytic inverse of pchen (agreement to machine precision),
rchen here draws qchen(runif(n), beta, lambda), which keeps
all six univariate Chen routines mutually consistent. Everything is still
computed by reliaR.
dchen(0.5, beta = 1.5, lambda = 2) pchen(0.5, beta = 1.5, lambda = 2) qchen(0.5, beta = 1.5, lambda = 2) schen(0.5, beta = 1.5, lambda = 2) hchen(0.5, beta = 1.5, lambda = 2)dchen(0.5, beta = 1.5, lambda = 2) pchen(0.5, beta = 1.5, lambda = 2) qchen(0.5, beta = 1.5, lambda = 2) schen(0.5, beta = 1.5, lambda = 2) hchen(0.5, beta = 1.5, lambda = 2)
Collects fitted models into a single table of , AIC and BIC.
compare_models(...)compare_models(...)
... |
fitted model objects from |
A data frame with columns Model, nobs,
neglogL, AIC and BIC, sorted by increasing AIC
so that the best model is on the first row.
set.seed(1) a <- fitbvch(rbvch(200, 1.5, 2.5, 0.5, 1.8)) b <- fitbec(rbec(200, 1.5, 2.5, 0.5, 1.8, 2)) compare_models(a, b)set.seed(1) a <- fitbvch(rbvch(200, 1.5, 2.5, 0.5, 1.8)) b <- fitbec(rbec(200, 1.5, 2.5, 0.5, 1.8, 2)) compare_models(a, b)
Density, distribution function, quantile function, random generation, survival and hazard function for the univariate Extended Chen distribution used as the latent building block of the Bivariate Extended Chen (BEC) model.
sech(x, alpha, beta, lambda) hech(x, alpha, beta, lambda) dech(x, alpha, beta, lambda, log = FALSE) pech(q, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE) qech(p, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE) rech(n, alpha, beta, lambda)sech(x, alpha, beta, lambda) hech(x, alpha, beta, lambda) dech(x, alpha, beta, lambda, log = FALSE) pech(q, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE) qech(p, alpha, beta, lambda, lower.tail = TRUE, log.p = FALSE) rech(n, alpha, beta, lambda)
x, q
|
vector of quantiles. |
alpha, lambda, beta
|
positive parameters. |
log, log.p
|
logical; if |
lower.tail |
logical; if |
p |
vector of probabilities. |
n |
number of observations. |
The Extended Chen survival function is
giving hazard
and density . The quantile function is
available in closed form,
Unlike the univariate Chen distribution, which reliaR supplies, no Extended Chen implementation exists there, so it is provided here.
dech gives the density, pech the distribution
function, qech the quantile function, rech random
deviates, sech the survival function and hech the hazard
function.
sech(0.5, alpha = 1.5, beta = 1.5, lambda = 2) hech(0.5, alpha = 1.5, beta = 1.5, lambda = 2) qech(c(0.25, 0.5, 0.75), alpha = 1.5, beta = 1.5, lambda = 2)sech(0.5, alpha = 1.5, beta = 1.5, lambda = 2) hech(0.5, alpha = 1.5, beta = 1.5, lambda = 2) qech(c(0.25, 0.5, 0.75), alpha = 1.5, beta = 1.5, lambda = 2)
Fits the Bivariate Extended Chen model by maximum likelihood.
fitbec( x1, x2 = NULL, start = NULL, singular = TRUE, method = "BFGS", control = list(), se = TRUE )fitbec( x1, x2 = NULL, start = NULL, singular = TRUE, method = "BFGS", control = list(), se = TRUE )
x1, x2
|
numeric vectors of observations, or a two column matrix. |
start |
optional starting values on the natural scale in the order
|
singular |
logical; whether tied observations contribute the singular density. |
method |
optimisation method passed to |
control |
optional control list for |
se |
logical; whether standard errors should be computed. |
An object of class fitbec with the same components as
fitbvch.
set.seed(1) d <- rbec(400, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) fit <- fitbec(d) fitset.seed(1) d <- rbec(400, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) fit <- fitbec(d) fit
Fits the Marshall-Olkin type Bivariate Chen model by maximum likelihood.
fitbvch( x1, x2 = NULL, start = NULL, singular = TRUE, method = "BFGS", control = list(), se = TRUE )fitbvch( x1, x2 = NULL, start = NULL, singular = TRUE, method = "BFGS", control = list(), se = TRUE )
x1, x2
|
numeric vectors of observations, or a two column matrix. |
start |
optional numeric vector of starting values on the natural
scale, in the order |
singular |
logical; whether tied observations contribute the singular density. |
method |
optimisation method passed to |
control |
optional control list for |
se |
logical; whether standard errors should be computed. |
Observations with z1 == z2 fall on the singular component
of the model. Whether they contribute the singular density
or are discarded is controlled by singular; the counts
are always reported so the choice stays visible. Standard errors come
from the numerical Hessian of the log-likelihood and are on the
original (untransformed) scale.
An object of class fitbvch: a list with components
coefficients, vcov, se, loglik,
aic, bic, nobs, counts, converged,
message and call.
fitbec, fitifgmchen,
logLik_bvch
set.seed(1) d <- rbvch(400, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) fit <- fitbvch(d) fit coef(fit)set.seed(1) d <- rbvch(400, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) fit <- fitbvch(d) fit coef(fit)
Fits the Bivariate Inverse FGM Chen model by maximum likelihood.
fitifgmchen( x1, x2 = NULL, start = NULL, method = "BFGS", control = list(), se = TRUE )fitifgmchen( x1, x2 = NULL, start = NULL, method = "BFGS", control = list(), se = TRUE )
x1, x2
|
numeric vectors of observations, or a two column matrix. |
start |
optional starting values on the natural scale in the order
|
method |
optimisation method passed to |
control |
optional control list for |
se |
logical; whether standard errors should be computed. |
The copula parameters gamma and omega are constrained
to and are estimated on the logit scale; the remaining
parameters are estimated on the log scale. All reported values are on
the natural scale.
An object of class fitifgmchen with the same components as
fitbvch.
The four marginal parameters are estimated very precisely, but
gamma and omega are only weakly identified: with
simulated from the marginal
parameters have standard errors around while gamma
and omega have standard errors around and
. The log-likelihood surface is nearly flat in that
direction, so individual values of gamma and omega should
not be over-interpreted; logLik_ifgmchen is exported so the
profile likelihood can be inspected and start used to explore
it.
set.seed(1) d <- rifgmchen(400, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4) fit <- fitifgmchen(d) fitset.seed(1) d <- rifgmchen(400, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4) fit <- fitifgmchen(d) fit
The hazard gradients of the Bivariate Extended Chen model, that is the
hazard of the -th marginal conditional on the other component.
hbec1(x1, x2, alpha1, alpha2, alpha3, beta, lambda) hbec2(x1, x2, alpha1, alpha2, alpha3, beta, lambda)hbec1(x1, x2, alpha1, alpha2, alpha3, beta, lambda) hbec2(x1, x2, alpha1, alpha2, alpha3, beta, lambda)
x1, x2
|
numeric vectors of first and second component. |
alpha1, alpha2, alpha3, beta, lambda
|
positive parameters. |
with obtained by interchanging the roles of ,
and , .
A numeric vector.
hbec1(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) hbec2(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2)hbec1(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2) hbec2(0.5, 0.9, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8, lambda = 2)
The Inverse FGM (IFGM) copula, its density, dependence measures and a random generator.
cifgm(u, v, gamma, omega) cifgmdens(u, v, gamma, omega) rifgm(n, gamma, omega) tau_ifgm(gamma, omega) rho_ifgm(gamma, omega)cifgm(u, v, gamma, omega) cifgmdens(u, v, gamma, omega) rifgm(n, gamma, omega) tau_ifgm(gamma, omega) rho_ifgm(gamma, omega)
u, v
|
numeric vectors of copula arguments in |
gamma, omega
|
copula parameters, each in |
n |
number of observations. |
For the Inverse FGM copula is
Writing and
, its density has the closed form
with ,
and
.
Kendall's tau and Spearman's rho are computed as
Both are obtained by numerical quadrature and reproduce Monte Carlo
estimates from rifgm.
cifgm gives the copula, cifgmdens its density,
rifgm a two column matrix of copula draws, and tau_ifgm
and rho_ifgm scalar dependence measures.
With the denominator given
above, the copula lies below the independence copula
( at ),
so and are non-positive for :
numerically and at
. This is the usual behaviour of an
inverse FGM type copula. Both measures are exactly zero at
. Note that the summary document this package was
written from quotes for the same parameters,
which is inconsistent with the copula formula it also quotes; the formula
has been implemented as given, and tau_ifgm/rho_ifgm are
provided so the dependence can be checked directly.
cifgm(0.3, 0.7, gamma = 0.6, omega = 0.4) cifgmdens(0.3, 0.7, gamma = 0.6, omega = 0.4) tau_ifgm(0.6, 0.4) rho_ifgm(0.6, 0.4) set.seed(1) head(rifgm(5, gamma = 0.6, omega = 0.4))cifgm(0.3, 0.7, gamma = 0.6, omega = 0.4) cifgmdens(0.3, 0.7, gamma = 0.6, omega = 0.4) tau_ifgm(0.6, 0.4) rho_ifgm(0.6, 0.4) set.seed(1) head(rifgm(5, gamma = 0.6, omega = 0.4))
Reliability function, density, hazard function and random generation for the Bivariate Inverse FGM Chen model, obtained by combining the Inverse FGM copula with Chen marginals.
relifgmchen(x, y, theta1, beta1, theta2, beta2, gamma, omega) difgmchen(x, y, theta1, beta1, theta2, beta2, gamma, omega, log = FALSE) hifgmchen(x, y, theta1, beta1, theta2, beta2, gamma, omega) rifgmchen(n, theta1, beta1, theta2, beta2, gamma, omega)relifgmchen(x, y, theta1, beta1, theta2, beta2, gamma, omega) difgmchen(x, y, theta1, beta1, theta2, beta2, gamma, omega, log = FALSE) hifgmchen(x, y, theta1, beta1, theta2, beta2, gamma, omega) rifgmchen(n, theta1, beta1, theta2, beta2, gamma, omega)
x, y
|
numeric vectors of first and second component. |
theta1, beta1, theta2, beta2
|
positive marginal parameters. |
gamma, omega
|
copula parameters in |
log |
logical; if |
n |
number of observations. |
The marginals are Chen distributions
and
, which are exactly
reliaR::pchen(x, beta1, theta1) and
reliaR::pchen(y, beta2, theta2). With the Inverse FGM
copula of cifgm and its density, the joint
reliability function and density are
where and
, where dchen is
dchen. The hazard function is
the ratio .
A numeric vector, or for rifgmchen a two column matrix
with columns x and y.
Unlike the Marshall-Olkin type models, this construction is absolutely
continuous: it has no mass on the diagonal and therefore no singular
component. The survival function is
1 - pchen(x, beta1, theta1) - pchen(y, beta2, theta2) + R(x, y)
and can be negative by cancellation in the far tail.
cifgm, fitifgmchen,
plot_reliability_ifgmchen
difgmchen(0.5, 0.9, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4) relifgmchen(0.5, 0.9, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4) hifgmchen(0.5, 0.9, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4) set.seed(1) head(rifgmchen(5, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4))difgmchen(0.5, 0.9, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4) relifgmchen(0.5, 0.9, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4) hifgmchen(0.5, 0.9, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4) set.seed(1) head(rifgmchen(5, theta1 = 1.2, beta1 = 1.3, theta2 = 1.5, beta2 = 1.1, gamma = 0.6, omega = 0.4))
Tests the fitted marginals of a Bivariate Chen fit against the data using
ks.chen.
ksfit_bvch(fit, x1, x2 = NULL)ksfit_bvch(fit, x1, x2 = NULL)
fit |
a fitted model from |
x1, x2
|
numeric vectors of observations, or a two column matrix. |
The two components are compared with
and
, since and
, and their minimum with
, which is the marginal of
. Each of these is a Chen
distribution with the same shape , because the minimum of
independent Chen variables is Chen in the summed scale parameter.
A data frame with one row per series (Z1, Z2 and
min(Z1,Z2)), giving the fitted alpha and beta, the
Kolmogorov-Smirnov distance D and its p-value p.value,
together with the sample mean and standard deviation.
set.seed(1) d <- rbvch(200, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) fit <- fitbvch(d) ksfit_bvch(fit, d)set.seed(1) d <- rbvch(200, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) fit <- fitbvch(d) ksfit_bvch(fit, d)
Log-likelihoods used by fitbvch, fitbec and
fitifgmchen.
logLik_bvch(par, z1, z2, singular = TRUE) logLik_bec(par, z1, z2, singular = TRUE) logLik_ifgmchen(par, z1, z2)logLik_bvch(par, z1, z2, singular = TRUE) logLik_bec(par, z1, z2, singular = TRUE) logLik_ifgmchen(par, z1, z2)
par |
numeric vector of parameters on the log scale. |
z1, z2
|
numeric vectors of observations. |
singular |
logical; if |
For the Marshall-Olkin type models the log-likelihood is the
exact observed-data log-likelihood: the contribution of an observation
is entirely determined by whether , or
, so the complete-data log-likelihood coincides with the
observed-data one. Direct numerical maximisation is therefore used;
it reaches the same fixed point as the EM algorithm.
The sum of the log densities, or -Inf when any contribution
is not finite.
set.seed(1) d <- rbvch(50, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) logLik_bvch(log(c(1.5, 2.5, 0.5, 1.8)), d[, 1], d[, 2])set.seed(1) d <- rbvch(50, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) logLik_bvch(log(c(1.5, 2.5, 0.5, 1.8)), d[, 1], d[, 2])
Methods for the objects returned by fitbvch,
fitbec and fitifgmchen.
## S3 method for class 'fitbvch' print(x, digits = 4, ...) ## S3 method for class 'fitbec' print(x, digits = 4, ...) ## S3 method for class 'fitifgmchen' print(x, digits = 4, ...) ## S3 method for class 'fitbvch' summary(object, digits = 4, signif.stars = FALSE, ...) ## S3 method for class 'fitbec' summary(object, digits = 4, signif.stars = FALSE, ...) ## S3 method for class 'fitifgmchen' summary(object, digits = 4, signif.stars = FALSE, ...) ## S3 method for class 'fitbvch' coef(object, ...) ## S3 method for class 'fitbec' coef(object, ...) ## S3 method for class 'fitifgmchen' coef(object, ...) ## S3 method for class 'fitbvch' vcov(object, ...) ## S3 method for class 'fitbec' vcov(object, ...) ## S3 method for class 'fitifgmchen' vcov(object, ...) ## S3 method for class 'fitbvch' nobs(object, ...) ## S3 method for class 'fitbec' nobs(object, ...) ## S3 method for class 'fitifgmchen' nobs(object, ...) ## S3 method for class 'fitbvch' logLik(object, ...) ## S3 method for class 'fitbec' logLik(object, ...) ## S3 method for class 'fitifgmchen' logLik(object, ...) ## S3 method for class 'fitbvch' print(x, digits = 4, ...) ## S3 method for class 'fitbec' print(x, digits = 4, ...) ## S3 method for class 'fitifgmchen' print(x, digits = 4, ...) ## S3 method for class 'fitbvch' summary(object, digits = 4, signif.stars = FALSE, ...) ## S3 method for class 'fitbvch' coef(object, ...) ## S3 method for class 'fitbec' coef(object, ...) ## S3 method for class 'fitifgmchen' coef(object, ...) ## S3 method for class 'fitbvch' vcov(object, ...) ## S3 method for class 'fitbec' vcov(object, ...) ## S3 method for class 'fitifgmchen' vcov(object, ...) ## S3 method for class 'fitbvch' nobs(object, ...) ## S3 method for class 'fitbec' nobs(object, ...) ## S3 method for class 'fitifgmchen' nobs(object, ...) ## S3 method for class 'fitbvch' logLik(object, ...) ## S3 method for class 'fitbec' logLik(object, ...) ## S3 method for class 'fitifgmchen' logLik(object, ...)## S3 method for class 'fitbvch' print(x, digits = 4, ...) ## S3 method for class 'fitbec' print(x, digits = 4, ...) ## S3 method for class 'fitifgmchen' print(x, digits = 4, ...) ## S3 method for class 'fitbvch' summary(object, digits = 4, signif.stars = FALSE, ...) ## S3 method for class 'fitbec' summary(object, digits = 4, signif.stars = FALSE, ...) ## S3 method for class 'fitifgmchen' summary(object, digits = 4, signif.stars = FALSE, ...) ## S3 method for class 'fitbvch' coef(object, ...) ## S3 method for class 'fitbec' coef(object, ...) ## S3 method for class 'fitifgmchen' coef(object, ...) ## S3 method for class 'fitbvch' vcov(object, ...) ## S3 method for class 'fitbec' vcov(object, ...) ## S3 method for class 'fitifgmchen' vcov(object, ...) ## S3 method for class 'fitbvch' nobs(object, ...) ## S3 method for class 'fitbec' nobs(object, ...) ## S3 method for class 'fitifgmchen' nobs(object, ...) ## S3 method for class 'fitbvch' logLik(object, ...) ## S3 method for class 'fitbec' logLik(object, ...) ## S3 method for class 'fitifgmchen' logLik(object, ...) ## S3 method for class 'fitbvch' print(x, digits = 4, ...) ## S3 method for class 'fitbec' print(x, digits = 4, ...) ## S3 method for class 'fitifgmchen' print(x, digits = 4, ...) ## S3 method for class 'fitbvch' summary(object, digits = 4, signif.stars = FALSE, ...) ## S3 method for class 'fitbvch' coef(object, ...) ## S3 method for class 'fitbec' coef(object, ...) ## S3 method for class 'fitifgmchen' coef(object, ...) ## S3 method for class 'fitbvch' vcov(object, ...) ## S3 method for class 'fitbec' vcov(object, ...) ## S3 method for class 'fitifgmchen' vcov(object, ...) ## S3 method for class 'fitbvch' nobs(object, ...) ## S3 method for class 'fitbec' nobs(object, ...) ## S3 method for class 'fitifgmchen' nobs(object, ...) ## S3 method for class 'fitbvch' logLik(object, ...) ## S3 method for class 'fitbec' logLik(object, ...) ## S3 method for class 'fitifgmchen' logLik(object, ...)
x, object
|
a fitted model object. |
digits |
number of significant digits to print. |
... |
further arguments, currently unused. |
signif.stars |
logical; whether to print significance stars. |
The fitted objects also carry aic and bic
components, and compare_models tabulates them across
models. Because aic and bic are not S3 generics that a
package can register methods for, no aic or bic methods
are provided.
The printing methods return their argument invisibly;
coef, vcov, nobs and logLik return the
corresponding component of the fit.
set.seed(1) d <- rbvch(300, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) fit <- fitbvch(d) print(fit) summary(fit) coef(fit) vcov(fit) nobs(fit)set.seed(1) d <- rbvch(300, alpha1 = 1.5, alpha2 = 2.5, alpha3 = 0.5, beta = 1.8) fit <- fitbvch(d) print(fit) summary(fit) coef(fit) vcov(fit) nobs(fit)