Description Usage Arguments Details Value References See Also Examples

This function performs the Maximum Likelihhod Estimation of the TBS model. The optimization is done by the function ‘optim’ (or optionally the package Rsolnp when available).

1 2 3 | ```
tbs.survreg.mle(formula,dist=dist.error("all"),
method=c("Nelder-Mead", "BFGS", "Rsolnp", "SANN", "CG"),
verbose=FALSE,nstart=10,max.time=-1,seed=1234,gradient=FALSE)
``` |

`formula` |
A formula specification containing a Surv model with right-censored data as in the package survival. |

`dist` |
error distribution; |

`method` |
a vector of numerical methods to be used in the optimization. The function try all listed methods and returns all results, together with an indication of the solution with maximal likelihood among them. |

`verbose` |
Boolean to indicate the amount of output during the execution of the optimization. |

`nstart` |
Number of feasible initial points to guess when performing the optimization. |

`max.time` |
Maximum time (in minutes) to run the optimization (<= 0 means no limit). |

`seed` |
The number that is used to initialize the seed for random number generation. |

`gradient` |
if TRUE, MLE tries to use the implemented gradient functions (usually the numerical ones are ok). |

This function calls numerical optimization methods to maximize the likelihood of the TBS model, according to the given error distribution, method of optimization, and formula. The formula is supposed to have a Surv object and possibility co-variates, just as the standard specification of R formulas. The optimizers are going to do their best to find high likelihood estimates, but as in most estimation methods that need a numerical optimization procedure, the obtained estimate cannot be guaranteed to be a global optimal solution, but instead is dependent on the initial guessing points, and thus on the seed of the random number generation.

Either an element of class tbs.survreg.mle (with print, summary, and plot functions) or a list of them (depending whether the call of tbs.survreg.mle was made for a single distribution or a list of them). In case it is a list, additional fields named best and best.n give the name and the position of the best estimation in the list, respectively. Each element of tbs.survreg.mle has the following components:

`lambda` |
The estimate for parameter lambda |

`xi` |
The estimate for parameter xi |

`beta` |
A vector with the estimate for parameter beta |

`lambda.se` |
The standard error for parameter lambda |

`xi.se` |
The standard error for parameter xi |

`beta.se` |
A vector with the standard error for parameter beta |

`log.lik` |
The log-likelihood at parameters |

`error.dist` |
The error distribution chosen. |

`AIC` |
Akaike Information Criterion. |

`AICc` |
AICc is AIC with a second order correction for small sample sizes. |

`BIC` |
Bayesian Information Criterion. |

`method` |
Numerical method used to achive the MLE. |

`convergence` |
If |

`time` |
observed survival times. |

`error` |
error of the estimated model. |

`call` |
function evaluated. |

`formula` |
formula entered by user. |

`run.time` |
Time spent with the function. |

Meeker, W. and Escobar, L. (1998) *Statistical Methods for Reliability Data*. Willey, ISBN 0-471-14328-6.

`dist.error,tbs.survreg.be,dtbs,ptbs,qtbs,rtbs`

.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
# Alloy - T7987: data extracted from Meeker and Escobar (1998), pp. 131.
data(alloyT7987)
alloyT7987$time <- as.double(alloyT7987$time)
alloyT7987$delta <- as.double(alloyT7987$delta)
# MLE estimation with logistic error
formula <- survival::Surv(alloyT7987$time,alloyT7987$delta == 1) ~ 1
tbs.mle <- tbs.survreg.mle(formula,dist=dist.error("logistic"),method="Nelder-Mead",nstart=3)
# Kaplan-Meier estimation
km <- survival::survfit(formula)
# Plot survival function
plot(tbs.mle)
lines(km)
# Plot hazard function
plot(tbs.mle, plot.type="hazard")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.