Learn R Programming

lmomco (version 1.7.3)

expect.max.ostat: Compute the Expection of a Maximum Order Statistic (or others)

Description

This function computes

Usage

expect.max.ostat(n, para=NULL, cdf=NULL, pdf=NULL,
                 j=NULL, lower=-Inf, upper=Inf, ...)

Arguments

n
The sample size.
para
A distribution parameter list from a function such as vec2par or lmom2par.
cdf
CDF of the distribution for the parameters
pdf
PDF of the distribution for the parameters
j
The $j$th value of the order statistic, which defaults to n=j if j=NULL.
lower
The lower limit of the distribution for integration.
upper
The upper limit of the distribution for integration.
...
Additional arguments to pass to the cumulative distribution function.

Value

  • The expectation of the maximum order statistic, unless $j$ is specified and then the expectation of that order statistic is returned.

See Also

theoLmoms.max.ostat

Examples

Run this code
para <- vec2par(c(10,100), type="nor")

# The two output values from these two lines should be
# very similar: (1) theoretical and (2) simulation
expect.max.ostat(10, para=para, cdf=cdfnor, pdf=pdfnor)
mean(sapply(1:1000, function(x) { max(rlmomco(10,para))}))

Run the code above in your browser using DataLab