# NOT RUN {
set.seed(123); nn <- 1000
tdata <- data.frame(x2 = runif(nn), x3 = runif(nn))
tdata <- transform(tdata, y1 = rnorm(nn, 1 + 2 * x2),
y2 = rnorm(nn, 3 + 4 * x2),
y3 = rnorm(nn, 4 + 5 * x2))
fit1 <- vglm(cbind(y1, y2, y3) ~ x2, data = tdata,
trinormal(eq.sd = TRUE, eq.cor = TRUE), trace = TRUE)
coef(fit1, matrix = TRUE)
constraints(fit1)
summary(fit1)
# }
# NOT RUN {
# Try this when eq.sd = TRUE, eq.cor = TRUE:
fit2 <- vglm(cbind(y1, y2, y3) ~ x2, data = tdata, stepsize = 0.25,
trinormal(eq.sd = TRUE, eq.cor = TRUE,
lrho12 = extlogit(min = -0.5),
lrho23 = extlogit(min = -0.5),
lrho13 = extlogit(min = -0.5)), trace = TRUE)
coef(fit2, matrix = TRUE)
# }
Run the code above in your browser using DataLab