Learn R Programming

VGAM (version 0.8-1)

recnormal1: 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

recnormal1(lmean="identity", lsd="loge",
           imean=NULL, isd=NULL, method.init=1, zero=NULL)

Arguments

lmean, lsd
Link functions applied to the mean and sd parameters. See Links for more choices.
imean, isd
Numeric. Optional initial values for the mean and sd. The default value NULL means they are computed internally, with the help of method.init.
method.init
Integer, either 1 or 2 or 3. Initial method, three algorithms are implemented. Choose the another value if convergence fails, or use imean and/or isd.
zero
An integer vector, containing the value 1 or 2. If so, the mean or standard deviation respectively are modelled as an intercept only. Usually, setting zero=2 will be used, if used at all. The default value NULL means both l

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

normal1, dcnormal1.

Examples

Run this code
n = 10000
mymean = 100
# First value is reference value or trivial record
rawy = c(mymean, rnorm(n, me=mymean, sd=exp(3)))
(y = unique(cummax(rawy))) # Keep only observations that are records

fit = vglm(y ~ 1, recnormal1, trace=TRUE, maxit=200)
coef(fit, matrix=TRUE)
Coef(fit)
summary(fit)

Run the code above in your browser using DataLab