distr (version 2.7.0)

GeomParameter-class: Class "GeomParameter"

Description

The parameter of a geometric distribution, used by Geom-class

Arguments

Objects from the Class

Objects can be created by calls of the form new("GeomParameter", prob). Usually an object of this class is not needed on its own, it is generated automatically when an object of the class Geom is instantiated.

Slots

prob

Object of class "numeric": the probability of a geometric distribution

name

Object of class "character": a name / comment for the parameters

Extends

Class "Parameter", directly.

Methods

initialize

signature(.Object = "GeomParameter"): initialize method

prob

signature(object = "GeomParameter"): returns the slot prob of the parameter of the distribution

prob<-

signature(object = "GeomParameter"): modifies the slot prob of the parameter of the distribution

Deprecated

The use of this class is deprecated; it is to be replaced by a corresponding use of class NbinomParameter with slot size = 1 which may be generated, e.g. by new("NbinomParameter", prob, size = 1, name = "Parameter of a Geometric distribution")

See Also

Geom-class Parameter-class

Examples

Run this code
# NOT RUN {
## deprecated from 1.9 on 
 W <- new("GeomParameter",prob=0.5)
 prob(W) # prob of this distribution is 0.5.
 prob(W) <- 0.4 # prob of this distribution is now 0.4.
# }

Run the code above in your browser using DataLab