Learn R Programming

Sim.DiffProc (version 2.5)

Ajdgamma: Adjustment By Gamma Distribution

Description

Adjusted your sample by the gamma law, estimated these parameters using the method of maximum likelihood, and calculating the Akaike information criterion for one or several fitted model objects for which a log-likelihood value can be obtained, according to the formula -2*log-likelihood + k*npar, where npar represents the number of parameters in the fitted model, and k = 2 for the usual AIC, and computes confidence intervals for one or more parameters in a fitted model (Law).

Usage

Ajdgamma(X, starts = list(shape = 1, rate = 1), leve = 0.95)

Arguments

X
a numeric vector of the observed values.
starts
named list. Initial values for optimizer.
leve
the confidence level required.

Value

  • coefCoefficients extracted from the model.
  • AICA numeric value with the corresponding AIC.
  • vcovA matrix of the estimated covariances between the parameter estimates in the linear or non-linear predictor of the model.
  • confintA matrix (or vector) with columns giving lower and upper confidence limits for each parameter. These will be labelled as (1-level)/2 and 1 - (1-level)/2.

Details

The optim optimizer is used to find the minimum of the negative log-likelihood. An approximate covariance matrix for the parameters is obtained by inverting the Hessian matrix at the optimum. For more detail consulted mle,confint,AIC. R has the [dqpr]gamma functions to evaluate the density, the quantiles, and the cumulative distribution or generate pseudo random numbers from the gamma distribution.

See Also

Ajdchisq Adjustment By Chi-Squared Distribution,Ajdexp Adjustment By Exponential Distribution, Ajdf Adjustment By F Distribution,Ajdlognorm Adjustment By Log Normal Distribution, Ajdnorm Adjustment By Normal Distribution,Ajdt Adjustment By Student t Distribution, Ajdweibull Adjustment By Weibull Distribution,Ajdbeta Adjustment By Beta Distribution.

Examples

Run this code
X <- rgamma(100,shape=1,rate=0.5) 
gamma(1,0.5)~~ exp(0.5)~~ weibull(1,2)
Ajdgamma(X, starts = list(shape = 1, rate = 1), leve = 0.95)
Ajdexp(X)     
Ajdweibull(X)

Run the code above in your browser using DataLab