lognormal(lmeanlog = "identity", lsdlog = "loge",
emeanlog=list(), esdlog=list(), zero = NULL)
lognormal3(lmeanlog = "identity", lsdlog = "loge",
emeanlog=list(), esdlog=list(),
powers.try = (-3):3, delta = NULL, zero = NULL)
Links
for more choices.earg
in Links
for general information.lognormal()
,
the values must be from the set {1,2} which correspond to
mu
, sigma
, respectively.
For min(y) - 10^powers.try
where
y
is the response.delta = min(y)-lambda
.
If given, this supersedes the powers.try
argument.
The value must be positive."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
. A random variable $Y$ has a 3-parameter lognormal distribution
if $\log(Y-\lambda)$
is distributed $N(\mu, \sigma^2)$. Here,
$\lambda < Y$.
The expected value of $Y$, which is
lognormal()
and lognormal3()
fit the 2- and 3-parameter
lognormal distribution respectively. Clearly, if the location
parameter $\lambda=0$ then both distributions coincide.
rlnorm
,
normal1
.y = rlnorm(n <- 1000, meanlog=1.5, sdlog=exp(-0.8))
fit = vglm(y ~ 1, lognormal, trace=TRUE)
coef(fit, mat=TRUE)
Coef(fit)
x = runif(n <- 1000)
y = rlnorm(n, mean=0.5, sd=exp(x))
fit = vglm(y ~ x, lognormal(zero=1), trace=TRUE, crit="c")
coef(fit, mat=TRUE)
Coef(fit)
lambda = 4
y = lambda + rlnorm(n <- 1000, mean=1.5, sd=exp(-0.8))
fit = vglm(y ~ 1, lognormal3, trace=TRUE)
fit = vglm(y ~ 1, lognormal3, trace=TRUE, crit="c")
coef(fit, mat=TRUE)
Coef(fit)
summary(fit)
Run the code above in your browser using DataLab