| Title: | Statistical Methods for the Sujatha Distribution |
|---|---|
| Description: | Provides computational tools for the Sujatha distribution, including probability density, cumulative distribution, quantile function, random number generation, parameter estimation by maximum likelihood, goodness-of-fit procedures, and associated statistical methods for lifetime data analysis. |
| Authors: | Hosenur Rahman Prodhani [aut, cre] (ORCID: <https://orcid.org/0009-0001-3919-4952>) |
| Maintainer: | Hosenur Rahman Prodhani <[email protected]> |
| License: | GPL-3 | file LICENSE |
| Version: | 1.0.0 |
| Built: | 2026-10-04 10:02:42 UTC |
| Source: | https://github.com/hosenur72/sujathadist |
Akaike Information Criterion
## S3 method for class 'fitsujatha' AIC(object, ...)## S3 method for class 'fitsujatha' AIC(object, ...)
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
AIC value.
Returns the Bayesian Information Criterion (BIC).
## S3 method for class 'fitsujatha' BIC(object, ...)## S3 method for class 'fitsujatha' BIC(object, ...)
object |
An object of class |
... |
Additional arguments passed to or from other methods. |
A numeric value giving the BIC.
Coefficients of a fitted Sujatha distribution
## S3 method for class 'fitsujatha' coef(object, ...)## S3 method for class 'fitsujatha' coef(object, ...)
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Estimated parameter(s).
Computes Wald confidence intervals.
## S3 method for class 'fitsujatha' confint(object, parm = NULL, level = 0.95, ...)## S3 method for class 'fitsujatha' confint(object, parm = NULL, level = 0.95, ...)
object |
An object of class "fitsujatha". |
parm |
Ignored. |
level |
Confidence level. |
... |
Additional arguments passed to or from other methods. |
Confidence interval matrix.
Deviance
## S3 method for class 'fitsujatha' deviance(object, ...)## S3 method for class 'fitsujatha' deviance(object, ...)
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Model deviance.
Computes the probability density function (PDF) of the Sujatha distribution.
dsujatha(x, theta)dsujatha(x, theta)
x |
A numeric vector of observations. |
theta |
A positive parameter. |
A numeric vector of density values.
dsujatha(1, theta = 2) dsujatha(c(0.5, 1, 2), theta = 3)dsujatha(1, theta = 2) dsujatha(c(0.5, 1, 2), theta = 3)
Fits the Sujatha distribution using Maximum Likelihood Estimation (MLE).
fitsujatha(x, start = 1, method = "L-BFGS-B")fitsujatha(x, start = 1, method = "L-BFGS-B")
x |
A numeric vector of observations. |
start |
Initial value of theta. |
method |
Optimization method (default = "L-BFGS-B"). |
An object of class "fitsujatha" containing
Estimate
Standard error
Variance-covariance matrix
Hessian matrix
Log-likelihood
AIC
AICc
BIC
CAIC
HQIC
Deviance
Convergence status
Number of iterations
Original data
set.seed(123) x <- rsujatha(100, theta = 2) fit <- fitsujatha(x) fitset.seed(123) x <- rsujatha(100, theta = 2) fit <- fitsujatha(x) fit
Computes several goodness-of-fit statistics for a fitted Sujatha distribution.
gofsujatha(object)gofsujatha(object)
object |
An object of class |
A list containing
Log-likelihood
AIC
AICc
BIC
CAIC
HQIC
KS statistic
KS p-value
Anderson-Darling statistic
AD p-value
Cramer-von Mises statistic
CVM p-value
Watson statistic
Watson p-value
Log-likelihood
## S3 method for class 'fitsujatha' logLik(object, ...)## S3 method for class 'fitsujatha' logLik(object, ...)
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Object of class "logLik".
Produces diagnostic plots for an object of class
"fitsujatha".
## S3 method for class 'fitsujatha' plot(x, which = 1, ...)## S3 method for class 'fitsujatha' plot(x, which = 1, ...)
x |
An object of class |
which |
Integer specifying the plot to draw. |
... |
Additional arguments passed to or from other methods. |
A diagnostic plot.
Print a fitted Sujatha distribution
## S3 method for class 'fitsujatha' print(x, ...)## S3 method for class 'fitsujatha' print(x, ...)
x |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Prints the fitted model summary.
Computes the cumulative distribution function (CDF).
psujatha(q, theta)psujatha(q, theta)
q |
Numeric vector of quantiles. |
theta |
Positive parameter. |
A numeric vector of cumulative probabilities.
psujatha(1, theta = 2)psujatha(1, theta = 2)
Computes quantiles of the Sujatha distribution by numerically inverting the cumulative distribution function.
qsujatha(p, theta, lower.tail = TRUE, log.p = FALSE)qsujatha(p, theta, lower.tail = TRUE, log.p = FALSE)
p |
Numeric vector of probabilities. |
theta |
Positive parameter. |
lower.tail |
Logical; if TRUE (default), probabilities are P(X <= x). |
log.p |
Logical; if TRUE, probabilities are given as log(p). |
A numeric vector of quantiles.
qsujatha(0.5, theta = 2)qsujatha(0.5, theta = 2)
Generates random observations from the Sujatha distribution using one of three methods:
"mixture"Exact Gamma-mixture method (default).
"inverse"Inverse transform method.
"rejection"Acceptance-rejection method using an exponential proposal.
rsujatha( n, theta, method = c("mixture", "inverse", "rejection"), lambda = NULL, M = NULL )rsujatha( n, theta, method = c("mixture", "inverse", "rejection"), lambda = NULL, M = NULL )
n |
Number of observations. |
theta |
Positive parameter of the Sujatha distribution. |
method |
Generation method. One of
|
lambda |
Rate parameter of the exponential proposal. Used only for the rejection method. |
M |
Rejection constant. If NULL, it is computed automatically. |
A numeric vector of random observations.
set.seed(123) ## Gamma-mixture method (default) x1 <- rsujatha(10, theta = 2) ## Inverse transform x2 <- rsujatha(10, theta = 2, method = "inverse") ## Acceptance-Rejection x3 <- rsujatha(10, theta = 2, method = "rejection", lambda = 1)set.seed(123) ## Gamma-mixture method (default) x1 <- rsujatha(10, theta = 2) ## Inverse transform x2 <- rsujatha(10, theta = 2, method = "inverse") ## Acceptance-Rejection x3 <- rsujatha(10, theta = 2, method = "rejection", lambda = 1)
Variance-Covariance Matrix
## S3 method for class 'fitsujatha' vcov(object, ...)## S3 method for class 'fitsujatha' vcov(object, ...)
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Variance-covariance matrix.