set.seed(123)
n = 500
x = runif(n)
y = rcauchy(n, loc=1+5*x, scale=.4)
fit = vglm(y ~ x, cauchy1(scale=0.4), trace =TRUE, crit="c")
coef(fit, matrix=TRUE)
y = rcauchy(n, loc=exp(1+0.5*x), scale=.4)
hist(y)
fit = vglm(y ~ x, cauchy1(scale=0.4, lloc="loge"), trace=TRUE, crit="c")
coef(fit, matrix=TRUE)
fitted(fit)[1:4]
summary(fit)
Run the code above in your browser using DataLab