Learn R Programming

dbd (version 0.0-22)

expValDb: Expected value of a db distribution.

Description

Calculate the expected value (theoretical mean) of a random variable having a db distribution.

Usage

expValDb(ao,...)
# S3 method for mleDb
expValDb(ao,...)
# S3 method for default
expValDb(ao, beta, ntop, zeta=FALSE,...)

Arguments

ao

For the "mleDb" method this argument is an object of class "mleDb" as returned by mleDb(). For the default method it is a numeric scalar playing the role of alpha (see ddb()).

beta

See ddb().

ntop

See ddb().

zeta

See ddb().

Not used.

Value

Numeric scalar equal to the expected value of a db distributed random variable with the given parameters.

Details

For the "mleDb" method, the single argument should really be called (something like) “object” and for the default method the first argument should be called alpha. However the argument lists must satisfy the restrictions that “A method must have all the arguments of the generic, including … if the generic does.” and “A method must have arguments in exactly the same order as the generic.

For the "mleDb" method, the values of alpha, beta, ntop and zeta (passed to ddb()) are extracted from the attributes of ao.

The expected value of a db distribution is theoretically intractable but is readily calculable numerically as $$\sum x \times \Pr(X=x)$$.

See Also

ddb() varDb()

Examples

Run this code
# NOT RUN {
   expValDb(3,4,15)
   X   <- hmm.discnp::Downloads
   fit <- mleDb(X,ntop=15,zeta=TRUE)
   expValDb(fit)
# }

Run the code above in your browser using DataLab