# Both location and scale parameters unknown
x = runif(n <- 1000)
y = rcauchy(n, loc=exp(1+0.5*x), scale=exp(1))
fit = vglm(y ~ x, cauchy(lloc="loge"), trace=TRUE)
coef(fit, matrix=TRUE)
fitted(fit)[1:4] # location estimates
summary(fit)
# Location parameter unknown
set.seed(123)
x = runif(n <- 500)
y = rcauchy(n, loc=1+5*x, scale=0.4)
fit = vglm(y ~ x, cauchy1(scale=0.4), trace=TRUE, crit="c")
coef(fit, matrix=TRUE)
Run the code above in your browser using DataLab