
triangle(lower = 0, upper = 1, link = "elogit",
earg = if(link == "elogit") list(min = lower, max = upper) else
list(), itheta = NULL)
Links
for more choices.
The default constrains the estimate to lie in the interval.earg
in Links
for general information."vglmff"
(see vglmff-class
).
The object is used by modelling functions such as vglm
and vgam
. On fitting, the extra
slot has components called lower
and upper
which contains the values of the above arguments
(recycled to the right length).
The fitted values are the mean of the distribution, which is
a little messy to write.
Triangle
.tdata = data.frame(y = rtriangle(n <- 3000, theta = 3/4))
fit = vglm(y ~ 1, triangle(link = "identity"), tdata, trace = TRUE)
coef(fit, matrix = TRUE)
Coef(fit)
head(fit@extra$lower)
head(fitted(fit))
with(tdata, mean(y))
Run the code above in your browser using DataLab