contrast.mle.vam | R Documentation |
contrast.mle.vam
computes the contrast corresponding to the maximum likelihood estimation method for a virtual age model with Corrective Maintenance (CM) and planned Preventive Maintenance (PM).
The difference between the log-likelihood logLik.mle.vam
and the contrast is due to the parameter
α which represents the scale parameter of the time to failure distribution of the new unmaintained system, h(t) (see sim.vam
for more details). In fact, the value of α that maximizes the log-likelihood has a closed-form solution, function of the others parameters values. The contrast corresponds to the value of the log-likelihood evaluated at this particular value of α. Consequently, the contrast does not depend on α, that is to say of par0[1]
.
contrast.mle.vam(obj,par0,with_value=TRUE,with_gradient=FALSE,with_hessian=FALSE)
|
an object of class |
|
an optional argument specifying the parameter values at which the contrast is computed.
If |
|
a logical which indicates if the value of the contrast has to be computed. |
|
a logical which indicates if the gradient of the contrast has to be computed. |
|
a logical which indicates if the hessian of the contrast has to be computed. |
If only with_value
is TRUE
, the method produces the contrast value.
If only with_gradient
is TRUE
, the method produces a vector corresponding to the gradient of the contrast,
If only with_hessian
is TRUE
, the method produces a matrix corresponding to the hessian of the contrast.
Otherwise, the method produces a list of the contrast characteristics for which the corresponding argument is TRUE
.
L. Doyen and R. Drouilhet
run.mle.vam
to compute the MLE.
coef.mle.vam
to extract the parameters value of the MLE.
logLik.mle.vam
to compute the log-likelihood.
formula.mle.vam
to extract the original and estimated model.
plot.mle.vam
for plotting characteristics of the model.
update.mle.vam
to change the associated data set.
simARAInf<-sim.vam( ~ (ARAInf(.4) | Weibull(.001,2.5))) simData<-simulate(simARAInf,30) mleARAInf <- mle.vam(Time & Type ~ (ARAInf(0.5) | Weibull(1,3)),data=simData) Est<-coef(mleARAInf) contrast(mleARAInf) contrast(mleARAInf,Est,c(TRUE,TRUE,TRUE)) logLik(mleARAInf,Est,c(TRUE,TRUE,TRUE)) require(rgl) rhos<-seq(0,1,0.1) betas<-seq(0.1,6,0.1) lnL<-c() for (rho in rhos){ for (beta in betas) { lnL<-c(lnL,contrast(mleARAInf,c(1,beta,rho))) } } if(require(rgl)) { lnL<-matrix(data=lnL,nrow=length(rhos),ncol=length(betas),byrow=TRUE) persp3d(rhos, betas, lnL, col = 'skyblue',zlim=c(-100,max(lnL))) grid3d(c("rho", "b", "lnL")) spheres3d(Est[3],Est[2],contrast(mleARAInf,c(Est[1],Est[2],Est[3])),r=0.4,alpha=0.5,color="red",add=TRUE) indMax<-which(lnL==max(lnL), arr.ind = TRUE) spheres3d(rhos[indMax[1]],betas[indMax[2]],contrast(mleARAInf,c(1,betas[indMax[2]],rhos[indMax[1]])),r=0.3,color="black",add=TRUE) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.