Learn R Programming

lmomco (version 1.7.3)

vec2par: Convert a Vector of Parameters to a Parameter Object of a Distribution

Description

This function converts a vector of parameters to a parameter object of a distribution. The type of distribution is specified in the argument list: aep4, cau, exp, gam, gev, glo, gno, gpa, gum, kap, kur, lap, ln3, nor, pe3, ray, revgum, rice, texp, wak, and wei. If the distribution type is not identified, then the function issues a warning, but goes ahead and creates the parameter list and of course can not check for the validity of the parameters.

Usage

vec2par(vec, type, nowarn=FALSE, paracheck=TRUE, ...)

Arguments

vec
A vector of parameter values for the distribution specified by type.
type
Three character distribution type (for example, type='gev').
nowarn
A logical switch on warning surpression. If TRUE then options(warn=-1) is made and restored on return. This switch is to permit calls in which warnings are not desired as the user knows how to handle the returned value---say in a
paracheck
A logical controlling whether the parameters and checked for validity. Overriding of this check might be extremely important and needed for use of the distribution quantile function in the context of TL-moments with nonzero trimming.
...
Additional arguments for the are.par.valid call that is made internally.

Value

  • An R list is returned. This list should contain at least the following items, but some distributions such as the revgum have extra.
  • typeThe type of distribution in three character format.
  • paraThe parameters of the distribution.
  • sourceAttribute specifying source of the parameters---vec2par.

Details

If the distribution is a Reverse Gumbel (type=revgum)) or Generalized Pareto (type=gpa) , which are two-parameter or three-parameter distributions, the third or fourth value in the vector is the $\zeta$ of the distribution. $\zeta$ represents the fraction of the sample that is noncensored, or number of observed (noncensored) values divided by the sample size. The $\zeta$ represents censoring on the right, that is there are unknown observations above a threshold or the largest observed sample. Consultation of parrevgum or pargpaRC should elucidate the censoring discussion.

See Also

lmom2par

Examples

Run this code
para <- vec2par(c(12,123,0.5),'gev')
Q <- quagev(0.5,para)

my.custom <- vec2par(c(2,2),'myowndist') # Rice distribution

Run the code above in your browser using DataLab