Last chance! 50% off unlimited learning
Sale ends in
posnormal1(lmean = "identity", lsd = "loge",
imean = NULL, isd = NULL, nsimEIM = 100, zero = NULL)
Links
for more choices.NULL
means a value is computed internally.CommonVGAMffArguments
for more information.zero = NULL
then all linear/additive predict"vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
,
and vgam
.pnorm
).
Equivalently, this is
dnorm
). The mean of $Y$ is
normal1
,
tobit
.pdata <- data.frame(m = 1.0, SD = exp(1.0))
pdata <- transform(pdata, y = rposnorm(n <- 1000, m = m, sd = SD))
with(pdata, hist(y, prob = TRUE, border = "blue",
main = paste("posnorm(m =", m[1], ", sd =", round(SD[1], 2),")")))
fit <- vglm(y ~ 1, fam = posnormal1, pdata, trace = TRUE)
coef(fit, matrix = TRUE)
(Cfit <- Coef(fit))
mygrid <- with(pdata, seq(min(y), max(y), len = 200)) # Add the fit to the histogram
lines(mygrid, dposnorm(mygrid, Cfit[1], Cfit[2]), col = "red")
Run the code above in your browser using DataLab