Closed agila5 closed 3 years ago
Actually the solution is really simple, I just had to transform the list structure into a data.frame 😅
Hi,
Actually the solution is really simple, I just had to transform the list structure into a data.frame 😅
Data should be a list because you can vectors of variables and the matrix with the categorical covariate. I am not sure why it doesn’t work. In the code of the paper we include the intercepts as categorical covariates.
Best,
Virgilio
Dear Prof. Gómez-Rubio, I have yet another question 😅 I checked the code included in the paper on how to include a covariate in the model estimating a coefficient for each level of the random effect, and I think that the idea is to create a matrix all NA and fill the matrix in the appropriate rows and columns with the values of the covariate.
I tried to apply the same idea to a character/factor covariate and it doesn't work:
Created on 2020-05-07 by the reprex package (v0.3.0)
Did I miss something here or do I have to define the character matrix in some other way? Thank you very much for your help.