The goal of EstimationTools is to provide a routine for parameter estimation of probability density/mass functions in R.

Installation

You can install the lastest version of EstimationTools typing the following command lines in R console:

if (!require('devtools')) install.packages('devtools')
devtools::install_github('Jaimemosg/EstimationTools', force = TRUE)
library(EstimationTools)

Or you can install the released version from CRAN if you prefer. You can also type the following command lines in R console:

install.packages("EstimationTools")

You can visit the package website to explore the vignettes (articles) and functions reference.

Examples

These are basic examples which shows you how to solve a common maximum likelihood estimation problem with EstimationTools:

Estimation in regression models

We generate data from an hypothetic failure test of 621.94 hours with 30 experimental units, 15 from group 1 and 15 from group 2. Lets assume a censorship rate of 0.2, and regard that the data is right censored. Times from 6 experimental units are shown just bellow:

#>       t_sim status group
#> 1  585.7114      1     1
#> 2  429.6387      1     1
#> 3  580.4012      1     1
#> 28 600.7153      1     2
#> 29 372.3699      1     2
#> 30 400.9628      1     2

The model is as follows:

\[ f(t|\alpha, k) = \frac{\alpha}{k} \left(\frac{t}{k}\right)^{\alpha-1} \exp\left[-\left(\frac{t}{k}\right)^{\alpha}\right] \]

\[ \begin{aligned} T &\stackrel{\text{iid.}}{\sim} WEI(\alpha,\: k), \\ \alpha &= 1.5 + 0.3 \times group \quad (\verb|shape|),\\ k &= 500 \quad (\verb|scale|). \end{aligned} \]

The implementation and its solution is printed below: