Learn R Programming

VGAM (version 1.1-14)

rec.normal: Upper Record Values from a Univariate Normal Distribution

Description

Maximum likelihood estimation of the two parameters of a univariate normal distribution when the observations are upper record values.

Usage

rec.normal(lmean = "identitylink", lsd = "loglink",
          imean = NULL, isd = NULL, imethod = 1, zero = NULL)

Arguments

Value

An object of class "vglmff"

(see vglmff-class). The object is used by modelling functions such as vglm, and vgam.

Details

The response must be a vector or one-column matrix with strictly increasing values.

References

Arnold, B. C. and Balakrishnan, N. and Nagaraja, H. N. (1998). Records, New York: John Wiley & Sons.

See Also

uninormal, double.cens.normal.

Examples

Run this code
nn <- 10000; mymean <- 100
# First value is reference value or trivial record
Rdata <- data.frame(rawy = c(mymean, rnorm(nn, mymean, exp(3))))
# Keep only observations that are records:
rdata <- data.frame(y = unique(cummax(with(Rdata, rawy))))

fit <- vglm(y ~ 1, rec.normal, rdata, trace = TRUE, maxit = 200)
coef(fit, matrix = TRUE)
Coef(fit)
summary(fit)

Run the code above in your browser using DataLab