y = rsnorm(n <- 1000, shape=5)
fit = vglm(y ~ 1, skewnormal1, trace=TRUE)
coef(fit, matrix=TRUE)
fitted(fit)[1:4,]
mean(y)
hist(y, prob=TRUE)
x = seq(min(y), max(y), len=200)
lines(x, dsnorm(x, shape=Coef(fit)), col="blue")
x = runif(n)
y = rsnorm(n, shape=1 + 2*x)
fit = vglm(y ~ x, skewnormal1, trace=TRUE, crit="coef")
summary(fit)
Run the code above in your browser using DataLab