| Type: | Package |
| Title: | Statistical Methods for the Sujatha Distribution |
| Version: | 1.0.0 |
| Maintainer: | Hosenur Rahman Prodhani <hosenur72@gmail.com> |
| 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. The implemented methods are based on the Sujatha distribution proposed by Shanker (2016) <doi:10.59170/stattrans-2016-023>. |
| License: | GPL-3 |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.1 |
| Depends: | R (≥ 4.1.0) |
| Imports: | stats, graphics |
| Suggests: | testthat (≥ 3.0.0), knitr, rmarkdown, covr |
| VignetteBuilder: | knitr |
| URL: | https://github.com/hosenur72/SujathaDist |
| BugReports: | https://github.com/hosenur72/SujathaDist/issues |
| Config/testthat/edition: | 3 |
| NeedsCompilation: | no |
| Packaged: | 2026-08-23 16:53:13 UTC; hosen |
| Author: | Hosenur Rahman Prodhani
|
| Repository: | CRAN |
| Date/Publication: | 2026-09-03 12:20:16 UTC |
Akaike Information Criterion
Description
Akaike Information Criterion
Usage
## S3 method for class 'fitsujatha'
AIC(object, ...)
Arguments
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Value
AIC value.
Bayesian Information Criterion
Description
Returns the Bayesian Information Criterion (BIC).
Usage
## S3 method for class 'fitsujatha'
BIC(object, ...)
Arguments
object |
An object of class |
... |
Additional arguments passed to or from other methods. |
Value
A numeric value giving the BIC.
Coefficients of a fitted Sujatha distribution
Description
Coefficients of a fitted Sujatha distribution
Usage
## S3 method for class 'fitsujatha'
coef(object, ...)
Arguments
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Value
Estimated parameter(s).
Confidence Intervals
Description
Computes Wald confidence intervals.
Usage
## S3 method for class 'fitsujatha'
confint(object, parm = NULL, level = 0.95, ...)
Arguments
object |
An object of class "fitsujatha". |
parm |
Ignored. |
level |
Confidence level. |
... |
Additional arguments passed to or from other methods. |
Value
Confidence interval matrix.
Deviance
Description
Deviance
Usage
## S3 method for class 'fitsujatha'
deviance(object, ...)
Arguments
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Value
Model deviance.
Density Function of the Sujatha Distribution
Description
Computes the probability density function (PDF) of the Sujatha distribution.
Usage
dsujatha(x, theta)
Arguments
x |
A numeric vector of observations. |
theta |
A positive parameter. |
Value
A numeric vector of density values.
Examples
dsujatha(1, theta = 2)
dsujatha(c(0.5, 1, 2), theta = 3)
Maximum Likelihood Estimation for the Sujatha Distribution
Description
Fits the Sujatha distribution using Maximum Likelihood Estimation (MLE).
Usage
fitsujatha(x, start = 1, method = "L-BFGS-B")
Arguments
x |
A numeric vector of observations. |
start |
Initial value of theta. |
method |
Optimization method (default = "L-BFGS-B"). |
Value
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
Examples
set.seed(123)
x <- rsujatha(100, theta = 2)
fit <- fitsujatha(x)
fit
Goodness-of-Fit Measures for the Sujatha Distribution
Description
Computes several goodness-of-fit statistics for a fitted Sujatha distribution.
Usage
gofsujatha(object)
Arguments
object |
An object of class |
Value
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
Description
Log-likelihood
Usage
## S3 method for class 'fitsujatha'
logLik(object, ...)
Arguments
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Value
Object of class "logLik".
Diagnostic Plots for Sujatha Distribution
Description
Produces diagnostic plots for an object of class
"fitsujatha".
Usage
## S3 method for class 'fitsujatha'
plot(x, which = 1, ...)
Arguments
x |
An object of class |
which |
Integer specifying the plot to draw. |
... |
Additional arguments passed to or from other methods. |
Value
A diagnostic plot.
Print a fitted Sujatha distribution
Description
Print a fitted Sujatha distribution
Usage
## S3 method for class 'fitsujatha'
print(x, ...)
Arguments
x |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Value
Prints the fitted model summary.
Cumulative Distribution Function of the Sujatha Distribution
Description
Computes the cumulative distribution function (CDF).
Usage
psujatha(q, theta)
Arguments
q |
Numeric vector of quantiles. |
theta |
Positive parameter. |
Value
A numeric vector of cumulative probabilities.
Examples
psujatha(1, theta = 2)
Quantile Function of the Sujatha Distribution
Description
Computes quantiles of the Sujatha distribution by numerically inverting the cumulative distribution function.
Usage
qsujatha(p, theta, lower.tail = TRUE, log.p = FALSE)
Arguments
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). |
Value
A numeric vector of quantiles.
Examples
qsujatha(0.5, theta = 2)
Random Generation from the Sujatha Distribution
Description
Generates random observations from the Sujatha distribution using one of three methods: #' @details Three random generation methods are available:
-
"mixture": Exact gamma-mixture method (default). -
"inverse": Inverse transform method. -
"rejection": Acceptance-rejection method using an exponential proposal.
Usage
rsujatha(
n,
theta,
method = c("mixture", "inverse", "rejection"),
lambda = NULL,
M = NULL
)
Arguments
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. |
Value
A numeric vector of random observations.
Examples
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
Description
Variance-Covariance Matrix
Usage
## S3 method for class 'fitsujatha'
vcov(object, ...)
Arguments
object |
An object of class "fitsujatha". |
... |
Additional arguments passed to or from other methods. |
Value
Variance-covariance matrix.