Skip to content

Commit

Permalink
Fix an error in details
Browse files Browse the repository at this point in the history
  • Loading branch information
mnrzrad committed Apr 14, 2024
1 parent 476b412 commit cc92238
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 40 deletions.
8 changes: 4 additions & 4 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export(dnsLaplace)
export(dnsNegBinom)
export(dnsNorm)
export(dnsPois)
export(dnsRayleigh)
export(dnsUnif)
export(dnsWeibull)
export(dnsrayleigh)
export(pnsBeta)
export(pnsBinom)
export(pnsDiscUnif)
Expand All @@ -31,9 +31,9 @@ export(pnsLaplace)
export(pnsNegBinom)
export(pnsNorm)
export(pnsPois)
export(pnsRayleigh)
export(pnsUnif)
export(pnsWeibull)
export(pnsrayleigh)
export(qnsBeta)
export(qnsBinom)
export(qnsDiscUnif)
Expand All @@ -48,9 +48,9 @@ export(qnsLaplace)
export(qnsNegBinom)
export(qnsNorm)
export(qnsPois)
export(qnsRayleigh)
export(qnsUnif)
export(qnsWeibull)
export(qnsrayleigh)
export(rnsBeta)
export(rnsBinom)
export(rnsDiscUnif)
Expand All @@ -65,9 +65,9 @@ export(rnsLaplace)
export(rnsNegBinom)
export(rnsNorm)
export(rnsPois)
export(rnsRayleigh)
export(rnsUnif)
export(rnsWeibull)
export(rnsrayleigh)
importFrom(stats,dbeta)
importFrom(stats,dbinom)
importFrom(stats,dgamma)
Expand Down
2 changes: 1 addition & 1 deletion R/nsnorm.R
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#' \deqn{f_N(x) = \frac{1}{\sigma_N \sqrt{2 \pi}} \exp\{\left(\frac{\left(X-\mu_N\right)^2}{2 \sigma_N^2}\right)}\}
#' for \eqn{\mu_N \in (\mu_L, \mu_U)}, the mean which must be an interval, and
#' \eqn{\sigma_N \in (\sigma_L, \sigma_U)}, the standard deviation which must
#' also be a positive interval, and \eqn{-\infty < x < \infty}.#'
#' also be a positive interval, and \eqn{-\infty < x < \infty}.
#'
#' @name Neutrosophic Normal
#' @param x a vector or matrix of observations for which the pdf needs to be computed.
Expand Down
28 changes: 14 additions & 14 deletions R/nsrayleigh.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#' generation for the neutrosophic Rayleigh distribution with
#' parameter \eqn{\theta_N}.
#'
#' The neutrosophic Rayleigh distribution with parameter \eqn{\theta}
#' The neutrosophic Rayleigh distribution with parameter \eqn{\theta_N}
#' has the density
#' \deqn{f_N(x)=\frac{x}{\theta_N^2} \exp\{-\frac{1}{2}\left(\frac{x}{\theta_N}\right)^2\}}
#' for \eqn{\theta_N \in (\theta_L, \theta_U)}, which must be a positive
Expand All @@ -20,13 +20,13 @@
#' \eqn{P(X \leq x)}; otherwise, \eqn{P(X >x)}.
#'
#' @return
#' \code{dnsrayleigh} gives the density function
#' \code{dnsRayleigh} gives the density function
#'
#' \code{pnsrayleigh} gives the distribution function
#' \code{pnsRayleigh} gives the distribution function
#'
#' \code{qnsrayleigh} gives the quantile function
#' \code{qnsRayleigh} gives the quantile function
#'
#' \code{rnsrayleigh} generates random variables from the Neutrosophic Rayleigh Distribution.
#' \code{rnsRayleigh} generates random variables from the Neutrosophic Rayleigh Distribution.
#'
#' @references
#' Khan, Z., Gulistan, M., Kausar, N. and Park, C. (2021).
Expand All @@ -36,18 +36,18 @@
#' @importFrom stats runif
#' @examples
#' data(remission)
#' dnsrayleigh(x = remission, theta = c(9.6432, 9.8702))
#' dnsRayleigh(x = remission, theta = c(9.6432, 9.8702))
#'
#' pnsrayleigh(q = 20, theta = c(9.6432, 9.8702))
#' pnsRayleigh(q = 20, theta = c(9.6432, 9.8702))
#'
#' # Calculate quantiles
#' qnsrayleigh(p = c(0.25, 0.5, 0.75), theta = c(9.6432, 9.8702))
#' qnsRayleigh(p = c(0.25, 0.5, 0.75), theta = c(9.6432, 9.8702))
#'
#' # Simulate 10 values
#' rnsrayleigh(n = 10, theta = c(9.6432, 9.8702))
#' rnsRayleigh(n = 10, theta = c(9.6432, 9.8702))
#'
#' @export
dnsrayleigh <- function(x, theta) {
dnsRayleigh <- function(x, theta) {
if (any(theta <= 0)) {
stop("Arguments are incompatible.")
}
Expand All @@ -73,7 +73,7 @@ dnsrayleigh <- function(x, theta) {
}
#' @name Neutrosophic Rayleigh
#' @export
pnsrayleigh <- function(q, theta, lower.tail = TRUE) {
pnsRayleigh <- function(q, theta, lower.tail = TRUE) {
if (any(theta <= 0) || any(q < 0)) {
stop("Arguments are incompatible.")
}
Expand Down Expand Up @@ -104,7 +104,7 @@ pnsrayleigh <- function(q, theta, lower.tail = TRUE) {
}
#' @name Neutrosophic Rayleigh
#' @export
qnsrayleigh <- function(p, theta) {
qnsRayleigh <- function(p, theta) {
if (any(p < 0) || any(p > 1)) {
stop(message = "Warning: p should be in the interval [0,1].")
}
Expand Down Expand Up @@ -132,14 +132,14 @@ qnsrayleigh <- function(p, theta) {

#' @name Neutrosophic Rayleigh
#' @export
rnsrayleigh <- function(n, theta) {
rnsRayleigh <- function(n, theta) {
if (any(theta <= 0)) {
stop(message = "Arguments are incompatible.")
}

theta <- rep(theta, length.out = 2)

X <- qnsrayleigh(runif(n), theta)
X <- qnsRayleigh(runif(n), theta)
condition <- X[, 1] > X[, 2]
X[condition, 1:2] <- X[condition, 2:1]

Expand Down
2 changes: 1 addition & 1 deletion R/nsunif.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#' variable \eqn{X} with parameters \eqn{a_N} and \eqn{b_N}.
#'
#' The neutrosophic Uniform distribution with parameters
#' \eqn{\max_N} and \eqn{\min_N} has the density
#' \eqn{a_N} and \eqn{b_N} has the density
#' \deqn{f_N(x)=\frac{1}{b_N-a_N}}
#' for \eqn{a_N \in (a_L, a_U)} lower parameter interval, \eqn{b_N \in (b_L,b_U)},
#' upper parameter interval.
Expand Down
2 changes: 1 addition & 1 deletion man/Neutrosophic-Normal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 18 additions & 18 deletions man/Neutrosophic-Rayleigh.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/Neutrosophic-Uniform.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cc92238

Please sign in to comment.