Package 'MMAD'

Title: MM Algorithm Based on the Assembly-Decomposition Technology
Description: The Minorize-Maximization(MM) algorithm based on Assembly-Decomposition(AD) technology can be used for model estimation of parametric models, semi-parametric models and non-parametric models. We selected parametric models including left truncated normal distribution, type I multivariate zero-inflated generalized poisson distribution and multivariate compound zero-inflated generalized poisson distribution; semiparametric models include Cox model and gamma frailty model; nonparametric model is estimated for type II interval-censored data. These general methods are proposed based on the following papers, Tian, Huang and Xu (2019) <doi:10.5705/SS.202016.0488>, Huang, Xu and Tian (2019) <doi:10.5705/ss.202016.0516>, Zhang and Huang (2022) <doi:10.1117/12.2642737>.
Authors: Xifen Huang [aut], Dengge Liu [aut, cre], Yunpeng Zhou [ctb]
Maintainer: Dengge Liu <[email protected]>
License: GPL (>= 3)
Version: 1.0.0
Built: 2024-11-06 06:15:08 UTC
Source: CRAN

Help Index


Breast Cosmesis Data

Description

The often used data set for interval censored data, described and given in full in Finkelstein and Wolfe (1985).

Usage

bcos

Format

An object of class data.frame with 94 rows and 3 columns.

Value

Breast cosmesis data contains the following fields:

left

a numeric vector

right

a numeric vector

treatment

a factor with levels Rad and RadChem

References

Finkelstein D.M. and Wolfe R.A.(1985). "A semiparametric model for regression analysis of interval-censored failure time data." Biometrics 41, 933-945.

Examples

data = data(bcos)

The children’s absenteeism data in Indonesia

Description

In a survey of Indonesian family life conducted by Strauss et al. the participants included 7000 households sampled from 321 communities randomly selected from 13 of the nation’s 26 Provinces, in which 83% of the Indonesian population lived. Among those households with one child per household, 437 household heads were asked questions about the health of their children.

Usage

cadi

Format

An object of class data.frame with 437 rows and 2 columns.

Value

The children’s absenteeism data in Indonesia contains the following fields:

y1

The number of days the children missed their primary activities due to illness in the last four weeks

y2

The number of days the children spent in bed due to illness in the last four weeks

References

Huang X.F., Tian G.L., Zhang, C. and Jiang, X.(2017). "Type I multivariate zero-inflated generalized Poisson distribution with applications." Statistics and its Interface 10(2), 291-311.

Strauss J., Beegle K., Sikoki B., Dawiyanto A., Herawati Y. and Witoelar Y.(2004). "The Third Wave of the Indonesia Family Life Survey (IFLS): Overview and Field Report, WR-144/1-NIA/NICHD, RAND Corporation, Santa Monica, CA."

Examples

data = data(cadi)

MM algorithm based on AD technology for Cox model

Description

Let Ti,CiT_i, C_i and Xi=(xi1,,xiq)TX_i = (x_{i1},\cdots, x_{iq})^T denote the, survival time, the censoring time and a qq dimension vector of coefficients for the ii-th individual, respectively. And assume the censoring time CiC_i is independent of the survival time TiT_i are mutually independent, and Ii=I(TiCi)I_i = I(T_{i} \leqslant C_{i}) is the censoring indicator. Then the instantaneous hazard rate function of TiT_i is

λ(tXi)=λ0(t)exp(XiTβ)\lambda(t|X_i)=\lambda_{0}(t) \exp(X_{i}^{T} \beta)

where λ0(.)\lambda_{0}(.) is a baseline hazard rate and β=(β1,,βq)T\beta = (\beta_1, \cdots, \beta_q)^{T} is a vector of regression parameters. We denote Λ\Lambda as the accumulative hazard rate. Then the observed data likelihood function is

L(αYobs)=i=1n(λ0(ti)exp(XiTβ))Iiexp(Λ(ti)exp(XiTβ))L(\alpha | Y_{obs}) = \prod_{i=1}^n (\lambda_{0}(t_i) \exp(X_{i}^{T} \beta))^{I_i} \exp(-\Lambda(t_i) \exp(X_{i}^{T} \beta))

where α=(β,Λ)\alpha = (\beta, \Lambda). The CoxMM function is used to calculate the Cox model.

Usage

CoxMM(formula, data, beta = NULL, Maxiter = 2000, convergence = 1e-06, ...)

Arguments

formula

A formula object, which contains on the left hand side an object of the type Surv and on the right hand side is the terms, e.g. formula=Surv(time, status) ~ x.

data

A data.frame in which to interpret the variables named in the formula.

beta

A vector of unknown regression parameters, default is NULL. If is NULL, then make all beta=0 during calculation.

Maxiter

The maximum number of iterations is specified by default as 2000.

convergence

Specify the convergence criterion, the default is 1e-6.

...

Additional arguments

Details

The CoxMM function is used to calculate the Cox model using MM algorithms based on AD technology. EM algorithms rely on the fact that, after profiling out the nonparametric component Λ\Lambda, the resulting function is concave. However, when this assumption does not hold, maximizing the resulting function using Newton’s method becomes difficult, especially when there are a large number of covariates. MM algorithms can avoid the concavity requirement and bypass the need for Newton method and matrix inversion.

Value

An object of class CoxMM that contains the following fields: the Time, total amount of observations, total number of failure events, the variable name, the β\beta, the λ\lambda, the Λ\Lambda, convergence result, the log likelihood value, the standard deviation of the estimated β\beta, the likelihood-based 95% confidence interval for the β\beta.

References

D.R. Cox.(1972). 'Regression models and life tables.' Journal of the Royal Statistical Society(Series B) 34(2), 187-220.

Zhang L.L. and Huang X.F.(2022). 'On MM algorithms for Cox model with right-censored data.' In International Conference on Cloud Computing, Internet of Things, and Computer Applications (CICA 2022) 12303, 29-38.

Examples

library(survival)
CoxMM(Surv(time, status) ~ age + sex, lung)

MM algorithm based on the AD method for multivariate compound zero-inflated generalized poisson distribution

Description

Let Z0Bernoulli(1ϕ0)Z_0 \sim Bernoulli(1- \phi_0), x=(X1,,Xm)T\bf{x} = (X_1,\cdots, X_m)^T, XiZIGP(ϕi,λi,θi)X_i \sim ZIGP(\phi_i, \lambda_i, \theta_i), for i=1,,mi = 1,\cdots,m , and (Z0,X1,,Xm)(Z_0,X_1,\cdots, X_m) be mutually independent. A random vector y=(Y1,,Ym)T\bf{y}=(Y_1,\cdots, Y_m)^T follows a multivariate compound zero-inflated generalized poisson distribution if

y=dZ0x={0with probability λ0xwith probability 1λ0\bf{y} \overset{\rm{d}}= Z_{0}\bf{x}= \left\{ \begin{array}{ll} \bf{0} & \text{with probability} \ \lambda_0 \\ \bf{x} & \text{with probability} \ 1-\lambda_0 \\ \end{array} \right.

where λ0[0,1)\lambda_0 \in [0,1), ϕ=(ϕ1,,ϕm)T[0,1)m\bf{\phi}=(\phi_1,\cdots, \phi_m)^{T} \in [0, 1)^m, λ=(λ1,,λm)TR+m\bf{\lambda}=(\lambda_1,\cdots, \lambda_m)^{T} \in \mathbb{R}_{+}^{m}, θ=(θ1,,θm)T[0,1)m\bf{\theta}=(\theta_1,\cdots, \theta_m)^{T} \in [0, 1)^m. The CZIGPMM function is used to calculate the multivariate compound ZIGP model.

Usage

CZIGPMM(data, phi0, phi, la, th, Maxiter = 2000, convergence = 1e-06, ...)

Arguments

data

Data.frame or Matrix that contains corresponding covariates.

phi0

Probability value for the zero-inflated parameter for CZIGP model.

phi

Probability value for the zero-inflated parameter for ZIGP model.

la

The scale parameter for ZIGP model.

th

The discrete parameter for ZIGP model.

Maxiter

The maximum number of iterations is specified by default as 2000.

convergence

Specify the convergence criterion, the default is 1e-6.

...

Additional arguments

Details

The CZIGPMM function is used to calculate multivariate compound zero-inflated generalized poisson distribution model using MM algorithms based on AD technology. data is provided by user by default, it can be a data frame or a matrix. In addition, unknown parameters require users to give appropriate initial values, where 0<=phi0<1, each phi should 0<=phi<1, th should 0<=th<1, and each la should be greater than 0.

Value

An object of class CZIGPMM that contains the following fields: total amount of observations, the number of iterations, convergence rate, the log likelihood value, estimated results for the unknown parameters, the standard deviation of estimate for the unknown parameters, the likelihood-based 95% confidence interval for the unknown parameters, information criterion: AIC value and BIC value.

References

Tian G.L., Huang X.F. and Xu, J.(2019). 'An assembly and decomposition approach for constructing separable minorizing functions in a class of MM algorithms.' Statistica Sinica 29(2), 961-982.

Huang X.F., Tian G.L., Zhang, C. and Jiang, X.(2017). 'Type I multivariate zero-inflated generalized Poisson distribution with applications.' Statistics and its Interface 10(2), 291-311.

Examples

x1 <- c(0,35,23,34,8,19,0,0,0,0)
x2 <- c(38,15,0,25,34,0,0,0,0,0)
y <- cbind(x1, x2)
phi0 = 0.5; phi = rep(0.5,2); la = rep(1,2); th = rep(0.1,2)
CZIGPMM(y, phi0, phi, la, th)

MM algorithm based on AD technology for gamma frailty model

Description

Let Tij,CijT_{ij}, C_{ij} and Xij=(Xij1,,Xijq)TX_{ij} = (X_{ij1},\cdots, X_{ijq})^T denote the survival time, the censoring time and a vector of covariates, respectively. For the jj-th individual in the ii-th cluster, for j=1,,Mij=1, \cdots, M_i and i=1,,Bi=1, \cdots, B. And assume the censoring time CijC_{ij} is independent of the survival time TijT_{ij} given XijX_{ij}, and Iij=I(TijCij)I_{ij} = I(T_{ij} \leqslant C_{ij}) is the censoring indicator. Conditional on a cluster-specific frailty ωi\omega_i, then the frailty model postulates that the instantaneous hazard rate function of TijT_{ij} is

λ(tXij,ωi)=λ0(t)exp(XijTβ)ωi\lambda(t|X_{ij} , \omega_i )=\lambda_{0}(t) \exp(X_{ij}^{T} \beta) \omega_i

where λ0(t)\lambda_{0}(t) is a baseline hazard rate and β\beta is a vector of regression parameters. We assume that the frailty ω\omega has a gamma distribution with mean 1, variance θ\theta and density

g(ω)=ω11θexp(ωθ)Γ(1θ)θ1θg(\omega) = \frac{\omega^{\frac{1}{1-\theta}} \exp(-\frac{\omega}{\theta})}{\Gamma( \frac{1}{\theta}) \theta^{\frac{1}{\theta}}}

and we denote Λ\Lambda as the accumulative hazard rate. The GaFrailtyMM function is used to calculate the gamma frailty model.

Usage

GaFrailtyMM(
  formula,
  data,
  beta = NULL,
  theta = NULL,
  lambda = NULL,
  Maxiter = 2000,
  convergence = 1e-06,
  ...
)

Arguments

formula

A formula object, which contains on the left hand side an object of the type Surv and on the right hand side a +cluster(id) statement. e.g. formula=Surv(time, status) ~ x + cluster(id)

data

A data.frame in which to interpret the variables named in the formula.

beta

A vector of unknown regression parameters, default is NULL. If is NULL, then make all beta=1 during calculation.

theta

The variance of frailty factors subject to gamma distribution, default is NULL. If is NULL, then let theta=1 during calculation.

lambda

Baseline hazard rate, default set to NULL. If is NULL, then let each lambda equals to 1/N during calculation, which N is the number of observed.

Maxiter

The maximum number of iterations is specified by default as 2000.

convergence

Specify the convergence criterion, the default is 1e-6.

...

Additional arguments

Details

The GaFrailtyMM function is used to calculate gamma frailty survival model using MM algorithms based on AD technology. EM algorithms relies on the fact that, after profiling out the nonparametric component Λ0\Lambda_0, the resulting function is concave. When it does not hold, using Newton method to maximize the resulting function is difficult especially when there exist a large number of covariates. MM algorithms that can avoid the concavity requirement and bypass Newton method and matrix inversion.

Value

An object of class GaFrailtyMM that contains the following fields: total amount of observations, the Time, the Λ\Lambda, the λ\lambda, total number of failure events, total number of iterations, convergence result, the log likelihood value, the θ\theta, the standard deviation of the estimated θ\theta, the likelihood-based 95% confidence interval for the θ\theta, β\beta, the standard deviation of the estimated β\beta, the likelihood-based 95% confidence interval for the β\beta, the variable name.

References

Huang X.F., Xu J.F. and Tian G.L.(2019). 'On profile MM algorithms for gamma frailty survival models.' Statistica Sinica 29(2), 895-916.

Examples

library(survival)
GaFrailtyMM(Surv(time, status) ~ age + sex + cluster(id), data=kidney)

Control IC2Pro object

Description

Control IC2Pro object

Usage

IC2Control(Maxiter = 2000, convergence = 1e-06, Idigits = 4, Pdigits = 4)

Arguments

Maxiter

The maximum number of iterations is specified by default as 2000.

convergence

Specify the convergence criterion, the default is 1e-6.

Idigits

The number of decimal places for the survival interval values.

Pdigits

The number of decimal places for the survival probability values.

Value

list of Maxiter, convergence, Idigits, Pdigits.

Examples

IC2Control()

MM algorithm based on the AD method for case II interval-censored data

Description

The IC2MM function is used to calculate the case II interval-censored data model. A failure time study that consists of nn independent subjects from a homogeneous population with survival function S(t)S_{(t)}. Let TiT_{i} denote the survival time, and i=1,,ni=1, \ldots, n. Suppose that interval-censored data on the TiT_i are observed and given by

Yobs={(Li,Ri];i=1,,n}Y_{obs} = \{ (L_{i}, R_{i}]; i=1, \ldots, n \}

where Ti(Li,Ri]T_i \in (L_{i}, R_{i}]. Let {si}j=0m\{s_i \}_{j=0}^{m} denote the unique ordered elements of 0,Li,Ri,i=1,,n{0, L_{i}, R_{i}, i=1, \ldots, n }. Take αij=I(sj(Li,Ri])\alpha_{ij} = I(s_{j} \in (L_{i}, R_{i}] ) and pj=S(sj1)S(sj),j=1,,mp_{j}= S(s_{j-1}) - S(s_{j}), j= 1, \ldots, m. The log-likelihood function is

(pYobs)=i=1nlog(S(Li)S(Ri))=i=1nlog(j=1mαijpj)\ell( {p} | Y_{obs}) = \sum_{i=1}^{n} \log (S(L_{i}) - S(R_{i}) ) = \sum_{i=1}^{n} \log \left( \sum_{j=1}^{m} \alpha_{ij} p_{j} \right)

where p=(p1,,pm)T{p} = (p_1, \ldots, p_m)^{T} and j=1mpj=1,pj0\sum_{j=1}^{m} p_{j} = 1 , p_{j} \geqslant 0.

Usage

IC2MM(formula, data, ...)

Arguments

formula

A formula object, which contains on the left hand side an object of type = 'interval2' of the type Surv e.g. formula=Surv(L,R, type = 'interval2') ~ 1

data

A data.frame in which to interpret the variables named in the formula.

...

Additional arguments, e.g. control=IC2Control()

Details

The IC2MM function allows the distributions for multiple strata of dataset to be stored as one IC2 object, e.g. data=bcos.

Value

An object of class IC2MM that contains the following fields: error: convergence result; strata: dimensions of each df_tab; s: unique ordered elements of 0,Li,Ri,Inf{0, L_{i}, R_{i}, Inf}, if more than one strata, elements are concatenated; S: the survival function, if more than one strata, values are concatenated; df_tab: the dataframe of survival intervals and survival probabilities for each interval, if more than one strata, dataframes are concatenated.

References

Tian G.L., Huang X.F. and Xu, J.(2019). 'An assembly and decomposition approach for constructing separable minorizing functions in a class of MM algorithms.' Statistica Sinica 29(2), 961-982.

See Also

IC2Pro

Examples

library(survival)
L <- c(1.5, 0.1, 1.5, 0.5, 0.4, 0.2, 0.9, 0.2, 0.08, 1.9)
R <- c(2.1, 2.9, 2.7, 1.9, 1.3, 1.4, 2.3, 0.5, 1.5, 4.6 )
data <- data.frame(L, R)
IC2MM(Surv(L,R, type = 'interval2') ~ 1, data )

IC2MM(Surv(L,R, type = 'interval2') ~ 1, data, control=IC2Control(Pdigits=2) )

Calculate non-parametric estimate for case II interval censored survival function

Description

Calculate non-parametric estimate for case II interval censored survival function

Usage

IC2Pro(L, R, control = IC2Control(), ...)

Arguments

L

The numeric vector of left endpoints of censoring interval, the first element of Surv when type=’interval2’.

R

The numeric vector of right endpoints of censoring interval, the second element of Surv function when type=’interval2’.

control

An object as created by IC2Control

...

Additional arguments

Value

An object of class IC2Pro that contains the following fields: error: convergence result; strata: dimensions of df_tab; s: unique ordered elements of 0,Li,Ri,Inf{0, L_{i}, R_{i}, Inf}; S: the survival function; df_tab: the data frame of survival intervals and survival probabilities for each interval.

References

Tian G.L., Huang X.F. and Xu, J.(2019). 'An assembly and decomposition approach for constructing separable minorizing functions in a class of MM algorithms.' Statistica Sinica 29(2), 961-982.

See Also

IC2Control

Examples

L <- c(1.4, 1.5, 1.3, 0.9, 0.4, 0.2, 0.5, 0.03, 1.7, 0.2)
R <- c(2.2, 3, 2.4, 1.2, 2.8, 0.3, 1.6, 2.5, 2.6, 3.4)
IC2Pro(L, R, control=IC2Control())

Kidney Infection Data

Description

The data consisted of the time to first and second infection relapse in 38 kidney disease patients using a portable dialysis machine. Infection may occur where the catheter was inserted. Catheters are subsequently removed if infection develops and may be removed for other reasons, in which case observations are censored.

Usage

kidney

Format

An object of class data.frame with 76 rows and 7 columns.

Value

Kidney infection data contains the following fields:

patient

id

time

time

status

event status

age

in years

sex

1=male, 2=female

disease

disease type (0=GN, 1=AN, 2=PKD, 3=Other)

frail

frailty estimate from original paper

References

McGilchrist C.A. and Aisbett C.W.(1991). "Regression with frailty in survival analysis." Biometrics 47, 461-466.

Examples

data = data(Kidney)

MM algorithm based on the AD method for left-truncated normal distribution

Description

The LTNMM function is used to calculate a left-truncated normal distribution model. A LTN(μ,σ2;a)LTN(\mu, \sigma^2; a) has the density function

f(y;μ,σ2;a)=1c2πσ2exp((yμ)22σ2)I(ya)f(y; \mu, \sigma^2; a) = \frac{1}{c \sqrt{2 \pi \sigma^{2}}} \exp{( -\frac{(y-\mu)^{2}}{2 \sigma^{2}} )} \centerdot I(y \geq a)

where (μ,σ2)(\mu, \sigma^2) are two unknown parameters, aa is a known constant, c=1Φ(auσ)c = 1- \Phi(\frac{a-u}{ \sigma}), and Φ()\Phi(\centerdot) is the cdf of the standard normal distribution.

Usage

LTNMM(
  formula,
  a,
  mu = NULL,
  sigma = NULL,
  data = sys.frame(sys.parent()),
  Maxiter = 2000,
  convergence = 1e-06,
  ...
)

Arguments

formula

A formula object which symbolically describes the model to calculated.

a

A numeric scalar of the known left truncation value.

mu

The mean of the normal distribution is set to NULL by default. If the distribution is truncated, we use estimates from OLS.

sigma

The variance of the normal distribution is set to NULL by default. If the distribution is truncated, we use estimates from OLS.

data

List that contains corresponding covariates. If none is provided then assumes objects are in user’s environment.

Maxiter

The maximum number of iterations is specified by default as 2000.

convergence

Specify the convergence criterion, the default is 1e-6.

...

Additional arguments

Details

The LTNMM function is used to calculate a left-truncated normal distribution model using MM algorithms based on AD technology. The formula parameter can be used to provide the data that needs to be calculated, such as formula=y~1. By default, the data is provided by the user’s environment. The initial values of the mean and variance of the normal distribution are estimated using OLS.

Value

An object of class LTNMM that contains the following fields: total amount of observations, the number of iterations, convergence rate, the log likelihood value, estimated results for the unknown parameters, the standard deviation of estimate for the unknown parameters, the likelihood-based 95% confidence interval for the unknown parameters, information criterion: AIC value and BIC value.

References

Tian G.L., Huang X.F., and Xu, J.(2019). 'An assembly and decomposition approach for constructing separable minorizing functions in a class of MM algorithms.' Statistica Sinica 29(2), 961-982.

Examples

y=c(8.7, 5.4, 8.9, 5.8, 6.2, 9.9, 7.5, 9.5, 6.5, 6.3); a=5
LTNMM(y~1, a=5)

NCCTG Lung Cancer Data

Description

Survival in patients with advanced lung cancer from the North Central Cancer Treatment Group. Performance scores rate how well the patient can perform usual daily activities.

Usage

lung

Format

An object of class data.frame with 228 rows and 10 columns.

Value

Kidney infection data contains the following fields:

inst

Institution code

time

Survival time in days

status

censoring status 1=censored, 2=dead

age

Age in years

sex

Male=1 Female=2

ph.ecog

ECOG performance score as rated by the physician. 0=asymptomatic, 1= symptomatic but completely ambulatory

ph.karno

Karnofsky performance score (bad=0-good=100) rated by physician

pat.karno

Karnofsky performance score as rated by patient

meal.cal

Calories consumed at meals

wt.loss

Weight loss in last six months (pounds)

References

Finkelstein D.M. and Wolfe R.A.(1985). "A semiparametric model for regression analysis of interval-censored failure time data." Biometrics 41, 933-945.

Examples

data = data(lung)

Plot the Cox object

Description

Plot the Cox object

Usage

## S3 method for class 'Cox'
plot(
  x,
  xlab = "Time",
  ylab = "Cumulative hazard",
  type = "s",
  lty = 1,
  lwd = 1,
  col = gray(0),
  digits = 4,
  ...
)

Arguments

x

The Cox object, see CoxMM.

xlab

x label, default is 'Time'.

ylab

y label, default is 'Cumulative hazard'.

type

type value, default is 's'.

lty

lty value for line, default is 1.

lwd

line width, default is 1.

col

color parameter, default is gray(0).

digits

The digits after the decimal point, default = 4.

...

Additional arguments

Value

the dataframe of 'Time' and accumulative hazard Λ\Lambda.

Examples

library(survival)
result <- CoxMM(Surv(time, status) ~ age + sex, lung)

plot(result)

Plot the GaF object

Description

Plot the GaF object

Usage

## S3 method for class 'GaF'
plot(
  x,
  xlab = "Time",
  ylab = "Cumulative hazard",
  type = "s",
  lty = 1,
  lwd = 1,
  col = gray(0),
  digits = 4,
  ...
)

Arguments

x

The GaF object, see GaFrailtyMM.

xlab

x label, default is 'Time'.

ylab

y label, default is 'Cumulative hazard'.

type

type value, default is 's'.

lty

lty value for line, default is 1.

lwd

line width, default is 1.

col

color parameter, default is gray(0).

digits

The digits after the decimal point, default = 4.

...

Additional arguments

Value

the dataframe of 'Time' and accumulative hazard Λ\Lambda.

Examples

library(survival)
result <- GaFrailtyMM(Surv(time, status) ~ age + sex + cluster(id), data=kidney)
plot(result)

Plot the IC2 object

Description

Plot the IC2 object

Usage

## S3 method for class 'IC2'
plot(
  x,
  xlab = "Time",
  ylab = "Survival",
  legend = NULL,
  main = "Survival Function",
  lty = 1:9,
  lwd = 1,
  xleg = 0,
  yleg = 0.15,
  col = gray(0),
  ...
)

Arguments

x

The IC2 object, see IC2MM.

xlab

x label, default is 'Time'.

ylab

y label, default is 'Survival'.

legend

legend, default=NULL.

main

figure title, default is 'Survival Function'

lty

lty value for line, default is 1:9.

lwd

line width, default is 1.

xleg

positional parameters of the legend, default=0.

yleg

positional parameters of the legend, default=0.15 .

col

the color of the drawing, default=gray(0)

...

Additional arguments

Value

A list of arguments for the legend. Values are x, y, legend, fill, lty, bty, col.

Examples

library(survival)
result = IC2MM(Surv(left, right, type = 'interval2') ~ treatment, bcos)

plot(result, col=c('red', 'blue'))

Summary of parameter estimates of a Cox model

Description

This function returns the result of the CoxMM function

Usage

## S3 method for class 'Cox'
summary(object, digits = 4, ...)

Arguments

object

Output from a call to Cox.

digits

The desired number of digits after the decimal point. Default of 4 digits is used.

...

Additional arguments

Value

Summary for CoxMM objects.

See Also

CoxMM

Examples

library(survival)
result <- CoxMM(Surv(time, status) ~ age + sex, lung)

summary(result,digits=4)

Summary of parameter estimates of a multivariate compound ZIGP model

Description

This function returns the result of the CZIGPMM function

Usage

## S3 method for class 'CZIGP'
summary(object, digits = 4, ...)

Arguments

object

Output from a call to CZIGP.

digits

The desired number of digits after the decimal point. Default of 4 digits is used.

...

Additional arguments

Value

Summary for CZIGPMM objects.

See Also

CZIGPMM

Examples

x1 <- c(0,35,23,34,8,19,0,0,0,0)
x2 <- c(38,15,0,25,34,0,0,0,0,0)
y <- cbind(x1, x2)
phi0 = 0.5; phi = rep(0.5,2); la = rep(1,2); th = rep(0.1,2)
result <- CZIGPMM(y, phi0, phi, la, th)

summary(result,digits=4)

Summary of parameter estimates of a gamma frailty model

Description

This function returns the result of the GaFrailtyMM function

Usage

## S3 method for class 'GaF'
summary(object, digits = 4, ...)

Arguments

object

Output from a call to GaF.

digits

The desired number of digits after the decimal point. Default of 4 digits is used.

...

Additional arguments

Value

Summary for GaFrailtyMM objects.

See Also

GaFrailtyMM

Examples

library(survival)
result <- GaFrailtyMM(Surv(time, status) ~ age + sex + cluster(id), data=kidney)

summary(result,digits=4)

Summary of parameter estimates of a IC2 model

Description

This function returns the result of the IC2MM function

Usage

## S3 method for class 'IC2'
summary(object, ...)

Arguments

object

Output from a call to IC2.

...

Additional arguments

Value

Summary for IC2MM objects.

See Also

IC2MM

Examples

library(survival)
result <- IC2MM(Surv(left, right, type = 'interval2') ~ treatment, bcos)

summary(result)

Summary of parameter estimates of a LTN model

Description

This function returns the result of the LTNMM function

Usage

## S3 method for class 'LTN'
summary(object, digits = 4, ...)

Arguments

object

Output from a call to LTN.

digits

The desired number of digits after the decimal point. Default of 4 digits is used.

...

Additional arguments

Value

Summary for LTNMM objects.

See Also

LTNMM

Examples

y=c(8.7, 5.4, 8.9, 5.8, 6.2, 9.9, 7.5, 9.5, 6.5, 6.3); a=5
result <- LTNMM(y~1, a=5)

summary(result,digits=4)

Summary of parameter estimates of a Type I multivariate ZIGP model

Description

This function returns the result of the ZIGPMM function

Usage

## S3 method for class 'ZIGP'
summary(object, digits = 4, ...)

Arguments

object

Output from a call to ZIGP.

digits

The desired number of digits after the decimal point. Default of 4 digits is used.

...

Additional arguments

Value

Summary for ZIGPMM objects.

See Also

ZIGPMM

Examples

x1 <- c(0, 0, 0,38, 0,19,25, 0,25, 0)
x2 <- c(0, 0, 0,23, 0,51,24, 0,10, 0)
y <- cbind(x1, x2)
phi0 = 0.5; la = rep(1,2); th = rep(0.1,2)
result <- ZIGPMM(y, phi0, la, th)

summary(result,digits=4)

Voluntary and involuntary job changes data

Description

Jung and Winkelmann(1993) provided data on both the numbers of voluntary and involuntary job changes of males during ten period 1974–1984. The samples contain 2124 males who started their working career before or in 1974 and did not retire before 1984.

Usage

vijc

Format

An object of class data.frame with 2124 rows and 2 columns.

Value

Voluntary and involuntary job changes data contains the following fields:

y1

Job changes after experiencing an unemployment spell(assumed to be involuntary)

y2

Direct job to job changes(which are assumed to be voluntary)

References

Huang X.F., Tian G.L., Zhang, C. and Jiang, X.(2017). "Type I multivariate zero-inflated generalized Poisson distribution with applications." Statistics and its Interface 10(2), 291-311.

Jung R.C. and Winkelmann R.(1993). "Two aspects of labor mobility: A bivariate Poisson regression approach." Empirical Economics 18(3), 543–556.

Examples

data = data(vijc)

MM algorithm based on the AD method for type I multivariate zero-inflated generalized poisson distribution

Description

Let ZBernoulli(1ϕ)Z \sim Bernoulli(1- \phi), x=(X1,,Xm)T{x} = (X_1,\cdots, X_m)^T, XiGP(λi,θi)X_i \sim GP(\lambda_i, \theta_i), for i=1,,mi = 1,\cdots,m , and (Z,X1,,Xm)(Z,X_1,\cdots, X_m) are mutually independent. An mm dimensional discrete random vector y=(Y1,,Ym)T{y}=(Y_1,\cdots, Y_m)^T is said to have a Type I multivariate zero-inflated generalized Poisson distribution(ZIGP) distribution if

y=dZx={0with probability λxwith probability 1λ{y} \overset{\rm{d}}= Z{x}= \left\{ \begin{array}{ll} {0} & \text{with probability} \ \lambda \\ {x} & \text{with probability} \ 1-\lambda \\ \end{array} \right.

where λ[0,1)\lambda \in [0,1), λ=(λ1,,λm)T{\lambda}=(\lambda_1,\cdots, \lambda_m)^T, θ=(θ1,,θm)T{\theta}=(\theta_1,\cdots, \theta_m)^T, max(1,λi/qi)<θi1max(-1, -\lambda_i/q_i) < \theta_i \leqslant 1 and qi4q_i \geqslant 4 is the largest positive integer for each λi+θiqi>0\lambda_i + \theta_{i}q_{i}>0 when θi<0\theta_{i}<0. The ZIGPMM function is used to calculate the Type I multivariate ZIGP model.

Usage

ZIGPMM(data, phi0, la, th, Maxiter = 2000, convergence = 1e-06, ...)

Arguments

data

Data.frame or Matrix that contains corresponding covariates.

phi0

Probability value for the zero-inflated parameter for ZIGP model.

la

The scale parameter for Generalized Poisson distribution model.

th

The discrete parameter for Generalized Poisson distribution model.

Maxiter

The maximum number of iterations is specified by default as 2000.

convergence

Specify the convergence criterion, the default is 1e-6.

...

Additional arguments

Details

The ZIGPMM function is used to calculate Type I multivariate zero-inflated generalized Poisson distribution model using MM algorithms based on AD technology. data is provided by user by default, it can be a data frame or a matrix. In addition, the unknown parameters require users to give appropriate initial values, where 0<=phi0<1, each th should satisfy 0<=th<1, and each la should be greater than 0.

Value

An object of class ZIGPMM that contains the following fields: total amount of observations, the number of iterations, convergence rate, the log likelihood value, estimated results for the unknown parameters, the standard deviation of estimate for the unknown parameters, the likelihood-based 95% confidence interval for the unknown parameters, information criterion: AIC value and BIC value.

References

Tian G.L., Huang X.F. and Xu, J.(2019). 'An assembly and decomposition approach for constructing separable minorizing functions in a class of MM algorithms.' Statistica Sinica 29(2), 961-982.

Huang X.F., Tian G.L., Zhang, C. and Jiang, X.(2017). 'Type I multivariate zero-inflated generalized Poisson distribution with applications.' Statistics and its Interface 10(2), 291-311.

Examples

x1 <- c(0, 0, 0,38, 0,19,25, 0,25, 0)
x2 <- c(0, 0, 0,23, 0,51,24, 0,10, 0)
y <- cbind(x1, x2)
phi0 = 0.5; la = rep(1,2); th = rep(0.1,2)
ZIGPMM(y, phi0, la, th)