idat <- data.frame(x2 = runif(nn <- 1000))
idat <- transform(idat, mymu = exp(2 + 1 * x2),
Lambda = exp(2 + 1 * x2))
idat <- transform(idat, y = rinv.gaussian(nn, mu = mymu, lambda = Lambda))
fit1 <- vglm(y ~ x2, inv.gaussianff, idat, trace = TRUE)
rrig <- rrvglm(y ~ x2, inv.gaussianff, idat, trace = TRUE)
coef(fit1, matrix = TRUE)
coef(rrig, matrix = TRUE)
Coef(rrig)
summary(fit1)
Run the code above in your browser using DataLab