gdata = data.frame(x = runif(nn <- 1000))
gdata = transform(gdata, theta = exp(-2+x))
gdata = transform(gdata, y1 = rexp(nn, rate=exp(-theta)/theta),
y2 = rexp(nn, rate=theta) + 1)
fit = vglm(cbind(y1,y2) ~ x, fam=gammahyp(expected=TRUE), gdata)
fit = vglm(cbind(y1,y2) ~ x, fam=gammahyp, gdata, trace=TRUE, crit="coef")
coef(fit, matrix=TRUE)
Coef(fit)
head(fitted(fit))
summary(fit)
Run the code above in your browser using DataLab