x = runif(n <- 1000)
y = rbisa(n, shape=exp(-0.5+x), scale=exp(1.5))
fit = vglm(y ~ x, bisa(zero=2), trace=TRUE)
coef(fit, matrix=TRUE)
y = rbisa(n=1000, shape=exp(-0.5), scale=exp(0.5))
fit = vglm(y ~ 1, bisa, trace=TRUE)
hist(y, prob=TRUE, ylim=c(0,0.5), col="lightblue")
coef(fit, matrix=TRUE)
mean(y)
head(fitted(fit))
x = seq(0, max(y), len=200)
lines(x, dbisa(x, Coef(fit)[1], Coef(fit)[2]), col="red", lwd=2)
Run the code above in your browser using DataLab