posnormal1(lmean="identity", lsd="loge",
emean=list(), esd=list(),
imean=NULL, isd=NULL, zero=NULL)
Links
for more choices.earg
in Links
for general information.NULL
means a value is computed internally.zero=NULL
then all linear/additive predictor"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
.m = 1.0; SD = exp(1.0)
y = rposnorm(n <- 1000, m=m, sd=SD)
hist(y, prob=TRUE, main=paste("posnorm(m=",m,", sd=",round(SD,2),")"))
fit = vglm(y ~ 1, fam=posnormal1, trace=TRUE)
coef(fit, mat=TRUE)
(Cfit = Coef(fit))
mygrid = 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