fitbccv.gammasp {bcfrailph} | R Documentation |
Bivariate correlated gamma frailty model fitting function.
Description
Semi-parametric Bivariate correlated gamma frailty model fitting function.
Usage
fitbccv.gammasp(
X,
Y,
initfrailp,
weights = NULL,
control = bcfrailph.control(),
SE = TRUE
)
Arguments
X |
Matix of predictors. This should not include an intercept. |
Y |
a Surv object containing 2 columns (coxph.fit). |
initfrailp |
Initial estimates for the frailty parameters. If not specified, initial frailty variance will be obtained from coxph with univariate gamma frailty model and for correlation c(0.5) will be used. |
weights |
vector of case weights. the default is NULL. |
control |
Arguments to control the fit. The default is |
SE |
a logical statement whether standard errors are obtained from the mariginal log likelihood.The default is TRUE. |
Value
An object of that contains the following components.
-
coefficients
- A vector of estimated Covariate coefficients. -
frailparest
- A vector of estimated Frailty parameters i.e. frailty variance and correlation. -
stderr
-A vector containing the Standard error of the Estimated parameters both covariate coefficients and frailty parameters. -
loglilk0
- Log likelihood of without frailty model or loglik of coxph fit. -
loglilk
-Log likelihood of Cox PH model with frailty. -
Iloglilk
- Log likelihood of with frailty. For gamma fit it is I-likelihood or the likelihood after integrating out the frailty term.For lognormal fit it is the approximate likelihood. -
bhaz
- an array containing unique event times and estimated baseline hazard. -
X
-Matrix of observed covariates. -
time
-the observed survival time. -
censor
-censoring indicator. -
resid
-the martingale residuals. -
lin.prid
-the vector of linear predictors. -
frail
-estimated Frailty values. -
iteration
-Number of outer iterations. -
e.time
-the vector of unique event times. -
n.event
- the number of events at each of the unique event times. -
convergence
-an indicator, 1 if converge and 0 otherwise. -
history
-an array containing records of estimates and other information on each iterations.
Note
This function is important especially for simulation studies as it reduced checking time. Parameters of Bivariate correlated gamma frailty model was estimated using a modified EM approach given in Kifle et al (2022).
References
Kifle YG, Chen DG, Haileyesus MT (2022). Multivariate Frailty Models using Survey Weights with Applications to Twins Infant Mortality in Ethiopia. Statistics and Its Interface,106(4), 1\-10.
See Also
Examples
set.seed(4)
simdata<-simbcfrailph(psize=300, cenr= c(0.3),beta=c(2),frailty=c("gamma"),
frailpar=c(0.5,0.5),bhaz=c("weibull"),
bhazpar=list(shape =c(5), scale = c(0.1)),
covartype= c("B"),covarpar=list(fargs=c(1),sargs=c(0.5)))
Y<-simdata$Y;X<-simdata$X
bcspfit<-fitbccv.gammasp(X=X,Y=Y,initfrailp=NULL)
bcspfit$coef
bcspfit$frailpar