EM_est: Estimate parameters and hazard function via EM algorithm.

Description Usage Arguments Value References Examples

View source: R/EM_est.R

Description

Estimate the vector of parameters for baseline covariates β and baseline cumulative hazard function Λ(\cdot) using the expectation-maximization algorithm. Λ(t) is estimated as a step function with jumps only at the observed failure times. Typically, it would only be used in a call to trans.m or Simu.

Usage

1
EM_est(Y, X, delta, alpha, Q = 60, EM_itmax = 250)

Arguments

Y

observed event times

X

design matrix

delta

censoring indicator. If Y_i is censored, delta=0. If not, delta=1.

alpha

parameter in transformation function

Q

number of nodes and weights in Gaussian quadrature. Defaults to 60.

EM_itmax

maximum iteration of EM algorithm. Defaults to 250.

Value

a list containing

beta_new estimator of β
Lamb_Y estimator of Λ(Y)
lamb_Y estimator of λ(Y)
lamb_Ydot estimator of λ(Y')
Y_eq_Yhat a matrix used in trans.m and Simu
Y_geq_Yhat a matrix used in trans.m and Simu

References

Abramowitz, M., and Stegun, I.A. (1972). Handbook of Mathematical Functions (9th ed.). Dover Publications, New York.

Evans, M. and Swartz, T. (2000). Approximating Integrals via Monte Carlo and Deterministic Methods. Oxford University Press.

Liu, Q. and Pierce, D.A. (1994). A note on Gauss-Hermite quadrature. Biometrika 81: 624-629.

Examples

1
2
3
4
5
  gen_data = generate_data(200, 1, 0.5, c(-0.5, 1))
  delta = gen_data$delta
  Y = gen_data$Y
  X = gen_data$X
  EM_est(Y, X, delta, alpha = 1)$beta_new - c(-0.5, 1)

transmdl documentation built on Oct. 14, 2021, 5:07 p.m.

Related to EM_est in transmdl...