I am relatively new to R. I am trying to fit a CAR model in R using a dta file from Stata. I am using INLA package (I also tried with BayesX).
This is my code:
model_linear <- inla(form_fit,family="gaussian",data=zim_child_model,
control.compute=list(dic=TRUE, waic=TRUE))
I keep running into this error:
Error: `dim<-.haven_labelled()` not supported.
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/vctrs_error_unsupported>
`dim<-.haven_labelled()` not supported.
Backtrace:
1. INLA::inla(...)
2. MatrixModels::model.Matrix(...)
3. Matrix::sparse.model.matrix(...)
4. Matrix:::model.spmatrix(...)
6. vctrs:::`dim<-.vctrs_vctr`(`*tmp*`, value = c(1L, length(f)))
7. vctrs:::stop_unsupported(x, "dim<-")
8. vctrs:::stop_vctrs(...)
Run `rlang::last_trace()` to see the full context