fitDRC (version 1.1.1)

drclass: The class 'drclass' in the fitDRC-package: its constructors and methods.

Description

An object of the class drclass defines a Density Ratio Class and has a structure of a list containing name, range, p, q, dist.lower, dist.upper. Methods for density ratio class such as metrics calculates the relative (to a credible interval 1-alpha) ambiguity of important attributes such as width, shape and mode. See the referenced literature for further information.

Usage

drclass.create(p = c(0.05,0.25,0.5,0.75,0.95),
               q = qnorm(c(0.05,0.25,0.5,0.75,0.95)),
               dist.lower = dist.normal.create(c(0,1)),
               dist.upper = dist.normal.create(c(0,1)))

# S3 method for drclass print(x = drc, ...) # S3 method for drclass summary(object = drc, alpha = 0.05, ...) # S3 method for drclass plot(x = drc, range = NA, plot.stat.values = FALSE, makePDF = FALSE, ...)

# S3 method for drclass Kappa(drc, ...) # S3 method for drclass Lambda(drc, ...)

# S3 method for drclass metrics(drc, alpha = 0.05, ...) # S3 method for drclass metric.ci(drc, alpha = 0.05, ...) # S3 method for drclass metric.width(drc, alpha = 0.05, ...) # S3 method for drclass metric.shape(drc, alpha = 0.05, ...) # S3 method for drclass metric.mode(drc, alpha = 0.05, ...)

Arguments

p

vector of probabilities according to q.

q

vector of quantiles according to p.

dist.lower

object of the class distribution.

dist.upper

object of the class distribution.

x

object of the class drclass

object

object of the class drclass

drc

object of the class drclass

alpha

Defines the credible level 1-alpha.

range

Plotrange.

plot.stat.values

Statistical values are added to the plot if TRUE.

makePDF

Creates a pdf if TRUE else not.

...

Further arguments that can be passed to the function.

Value

name

the name of the Density Ratio Class

range

the range of the Density Ratio Class

p

probabilities

q

quantiles

dist.lower

object of the class distribution

dist.upper

object of the class distribution

Details

No details.

References

Rinderknecht, S.L., Borsuk, M.E. and Reichert, P. Eliciting Density Ratio Classes. International Journal of Approximate Reasoning 52, 792-804, 2011. doi10.1016/j.ijar.2011.02.002. \ Rinderknecht, S. L., Borsuk, M. E. and Reichert, P. Bridging Uncertain and Ambiguous Knowledge with Imprecise Probabilities, Environmental Modelling & Software 36, 122-130, 2012.

See Also

See also fitDRC for general information and distribution, transformation, dist.trans.create for details.

Examples

Run this code
# NOT RUN {
drc <- drclass.create (p = c(0.05,0.25,0.666,0.75,0.95),
                       q = qnorm(c(0.05,0.25,0.5,0.75,0.95)),
                       dist.lower = dist.normal.create(c(0,1)),
                       dist.upper = dist.normal.create(c(0,1)))
drc
print(drc)   # prints the Density Ratio Class.
#summary(drc) # adds the metrics.
#plot(drc)    # plots the Density Ratio Class.

Kappa(drc)
Lambda(drc)

#metrics(drc) # all metrics.
#metric.ci(drc, 0.1) # outer credible interval for 0.9 content

#####################################################################################
### if you want to create your own Density Ratio Class use the following template ###
#####################################################################################

# drclass.create <- function(p = c(yourProbabilities),    # according to q
#                           q = qnorm(c(yourQuantiles)),  # according to p
#                           dist.lower = dist.yourDistribution.create(par),
#                           dist.upper = dist. yourDistribution.create(par)  )
# {
#
# drc                      <- list()
# drc$name                 <- "yourDRCname"
# drc$range                <- dist.upper$range(dist.upper$par) 
# drc$p                    <- p
# drc$q                    <- q
# drc$dist.lower           <- dist.lower
# drc$dist.upper           <- dist.upper
# class(drc)               <- "drclass"
# return(drc)
# }

# }

Run the code above in your browser using DataLab