Description Usage Arguments Value Examples
Returns a summary of a mfsurv object via summary.mcmc
.
mfsurv
fits a parametric Bayesian MF model via Markov Chain Monte Carlo (MCMC) to estimate the misclassification in the first stage
and the hazard in the second stage. Slice sampling is employed to draw the posterior sample of the model's split and survival stage parameters.
Returns a summary of a mfsurv object via summary.mcmc
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
object |
an object of class |
parameter |
one of three parameters of the mfsurv output. Indicate either "betas", "gammas" or "lambda". |
formula |
a formula in the form Y ~ X1 + X2... | C ~ Z1 + Z2 ... where Y is the duration until failure or censoring, and C is a binary indicator of observed failure. |
Y0 |
the elapsed time since inception until the beginning of time period (t-1). |
data |
list object of data. |
N |
number of MCMC iterations. |
burn |
burn-ins to be discarded. |
thin |
thinning to prevent autocorrelation of chain of samples by only taking the n-th values. |
w |
size of the slice in the slice sampling for (betas, gammas, lambda). The default is c(1,1,1). This value may be changed by the user to meet one's needs. |
m |
limit on steps in the slice sampling. The default is 10. This value may be changed by the user to meet one's needs. |
form |
type of parametric model distribution to be used. Options are "Exponential" or "Weibull". The default is "Weibull". |
na.action |
a function indicating what should happen when NAs are included in the data. Options are "na.omit" or "na.fail". The default is "na.omit". |
... |
additional parameter |
list. Empirical mean, standard deviation and quantiles for each variable.
mfsurv returns an object of class "mfsurv"
.
A "mfsurv"
object has the following elements:
Y |
the vector of ‘Y’. |
Y0 |
the vector of ‘Y0’. |
C |
the vector of ‘C’. |
X |
matrix X's variables. |
Z |
the vector of ‘Z’. |
betas |
data.frame, X.intercept and X variables. |
gammas |
data.frame, Z.intercept and Z variables. |
lambda |
integer. |
post |
integer. |
iterations |
number of MCMC iterations. |
burn_in |
burn-ins to be discarded. |
thinning |
integer. |
betan |
integer, length of posterior sample for betas. |
gamman |
integer, length of posterior sample for gammas. |
distribution |
character, type of distribution. |
call |
the call. |
formula |
description for the model to be estimated. |
list. Empirical mean, standard deviation and quantiles for each variable.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | set.seed(95)
bgl <- Buhaugetal_2009_JCR
bgl <- subset(bgl, coupx == 0)
bgl <- na.omit(bgl)
Y <- bgl$Y
X <- as.matrix(cbind(1, bgl[,1:7]))
C <- bgl$C
Z1 <- matrix(1, nrow = nrow(bgl))
Y0 <- bgl$Y0
model1 <- mfsurv(Y ~ X | C ~ Z1, Y0 = Y0,
N = 50,
burn = 20,
thin = 15,
w = c(0.1, .1, .1),
m = 5,
form = "Weibull")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.