Let's say I've got 3 scaled quantitative features, and 1 target categorical feature. Each quantitative feature is independent from each other. If I use glmmTMB to try and fit a model for this I could do something like this:
myModel<-glmmTMB(TargetFeature~FeatureA + FeatureB + FeatureC)
But if these features are from a collection of different experimental participants, recorded during different experiments should they be included also as random variables in the model definition?
something like :
myModel2<-glmmTMB(TargetFeature~FeatureA + FeatureB + FeatureC
+ (1 | Participant) + (1 | ExperimentGroup/Experiment))
The data would look like this:
data[1:5,c('Participant','ExperimentGroup', 'Experiment', 'FeatureA', 'FeatureB','FeatureC')]
Participant ExperimentGroup Experiment FeatureA FeatureB FeatureC
1 AC-001 E01 E01-A -0.5940626 -0.10808170 0.5198040
2 AC-001 E01 E01-A -0.5940626 -0.18172495 0.5198040
3 AC-001 E01 E01-A -0.5940626 -0.18172495 0.5198040
4 AC-001 E01 E01-A -0.5940626 0.21481427 0.5099361
5 AC-001 E01 E01-A -0.5940626 0.09152672 0.5090794
I'm having trouble understanding what would be necessary to model this, taking into account whether or not I'd need to use * or + for the second set of feature terms. (or even if I'm writing the model correctly at all) Any advice would be greatly appreciated!