Last data update: 2014.03.03

R: Three-Parameter Lognormal Distribution
LNORM3R Documentation

Three-Parameter Lognormal Distribution

Description

Density, distribution function, quantile function and random generation for the 3-parameter lognormal distribution with shape, scale, and threshold (or shift) parameters equal to shape, scale, and thres, respectively.

Usage

dlnorm3(x,shape=1,scale=1,thres=0,log=FALSE)
plnorm3(q,shape=1,scale=1,thres=0,lower.tail=TRUE,log.p=FALSE)
qlnorm3(p,shape=1,scale=1,thres=0,lower.tail=TRUE,log.p=FALSE)
rlnorm3(n,shape=1,scale=1,thres=0)

Arguments

x,q

vector of quantiles.

p

vector of probabilities.

n

number of observations.

shape

shape parameter.

scale

scale parameter.

thres

threshold (or shift) parameter.

log,log.p

logical; if TRUE, probabilities p are given as log(p).

lower.tail

logical; if TRUE (default), probabilities are P[X <= x],otherwise, P[X > x].

Details

If Y is a random variable distributed according to a normal distribution (with location(mean) and scale(standard deviation) parameters), then X = exp(Y)+m has a 3-parameter lognormal distribution with shape and scale parameters corresponding to the scale and location parameteres of Y, respectively; and threshold parameter m.

Value

dlnorm3 gives the density, plnorm3 gives the distribution function, qlnorm3 gives the quantile function, and rlnorm3 generates random deviates.

See Also

dnorm, pnorm, qnorm, rnorm, dlnorm, plnorm, qlnorm, rlnorm

Examples

m <- 100
x <- rlnorm3(10,1,0,m)
dlnorm3(x,1,0,m)
dlnorm(x-m,0,1)
dnorm(log(x-m),0,1)/(x-m)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(FAdist)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FAdist/LNORM3.Rd_%03d_medium.png", width=480, height=480)
> ### Name: LNORM3
> ### Title: Three-Parameter Lognormal Distribution
> ### Aliases: dlnorm3 plnorm3 qlnorm3 rlnorm3
> ### Keywords: distribution
> 
> ### ** Examples
> 
> m <- 100
> x <- rlnorm3(10,1,0,m)
> dlnorm3(x,1,0,m)
 [1] 0.1194491 0.6469181 0.4342111 0.1469204 0.4726239 0.1644642 0.4563093
 [8] 0.5235771 0.5586517 0.5484754
> dlnorm(x-m,0,1)
 [1] 0.1194491 0.6469181 0.4342111 0.1469204 0.4726239 0.1644642 0.4563093
 [8] 0.5235771 0.5586517 0.5484754
> dnorm(log(x-m),0,1)/(x-m)
 [1] 0.1194491 0.6469181 0.4342111 0.1469204 0.4726239 0.1644642 0.4563093
 [8] 0.5235771 0.5586517 0.5484754
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>