I am trying to run glmmLasso
to estimate a mixed model with the command:
glm1_final <- glmmLasso(Activity~Novelty + Valence + ROI, rnd =
list(Subject=~1), data = KNov, lambda=lambda[opt],switch.NR=F,final.re=TRUE)
This code is basically taken from demo("glmmLasso-soccer")
, but with my variables substituted in. Activity is a measure of brain activity, Novelty and Valence are categorical variables coding the type of stimulus used to elicit the response and ROI is a categorical variable coding three regions of the brain that we have sampled this activity from. Subject is an ID number for the individuals the data was sampled from (n=94). lambda[opt]
is being set in a previous step, although that previous step is giving me the errors in question as well, so I don't know if it is accurate.
I keep getting two warnings:
Warning messages: 1: In split.default((1:ncol(X))[-inotpen.which], ipen) : data length is not a multiple of split variable 2: In est.glmmLasso.RE(fix = fix, rnd = rnd, data = data, lambda = lambda, : Cluster variable should be specified as a factor variable!
The first only occurs if ROI is in the model. I haven't identified any change I can make to the model to make the second go away.
I have no idea what these warnings mean, and google hasn't turned up anything on them. I do still get estimates for my parameters, I just don't know if they are accurate, since I don't know what the warnings mean.
Anyone know what these warnings mean?
UPDATE:
I have uploaded an abreviated version of my data to: Google Drive
I have confirmed I still get the second error if I run the code:
KNov <- read.table("Nov_abr.txt", header = TRUE)
KNov$Subject <- factor(KNov$Subject)
library(glmmLasso)
glmmLasso(Activity~Novelty + Valence + ROI, rnd = list(Subject=~1), data = KNov, lambda=10,switch.NR=F,final.re=TRUE)
The KNov$Subject <- factor(KNov$Subject) did clear up the other error.
The version of R I have is: R version 3.3.0 (2016-05-03), Platform: "i386-w64-mingw32"