The -model is for specifying fixed effects, so you probably want the following
-model ‘Taste*Hydration’ \
Subject should be the first column, and a more appropriate random-effects structure is probably something like -ranEff ‘~1+Ssn|Subj’. However, with only 3 subjects, I’m not so sure whether the data would work out in this case.
This is going to get confusing in terms of what you and I are really talking about. We only have 3 subjects (monkeys), that’s why we need to run multiple sessions / subject. I think I have to turn the scripting upside down a little to get it to work for this scenario, follow me through…
My columns are really:
Session Monkey Taste Hydration InputFile
Session is the random factor. But in your terminology, it sounds like I must put it in the first column and call it ‘Subj’, correct? Fine.
So now I have:
Subj Monkey Taste Hydration InputFile
First, in this terminology, I want to specify Session (but remember here we’re calling it ‘Subj’) nested in Monkey.
Is that Monkey|Session or Session|Monkey?
Second, I think I should include Monkey as a fixed effect (since monkey is really not the same as your ‘Subj’ (your ‘Subj’ is my session)):
‘MonkeyTasteHydration’
I think you dropped Subj (i.e.session) from the fixed effects line because you thought it was in fact subject (but it’s really session).
So in the end we have:
fixed effects: monkey, taste, and hydration
random effects: session (which we’ll name ‘Subj’ in your terminology) nested in monkey
Yes 3dLME is hard coded with “Subj” as the default random-effects factor. So you may have to pretend that your ‘Session’ is your ‘Subj’ if you want to only model the random effects of “Session”.
When you say that you want to model “monkey” as a fixed-effects factor, are you really interested in the differences among the three monkeys? If not, you don’t have to explicitly put “monkey” in the model; that way the data from the three monkeys would be treated as three samples.
We model monkey to account for differences (and to see if there is an outlier); but the flip-side if this is that this factor hopefully “soaks up” variance attributable to monkey.
I still want to confirm my nesting argument is correct.
I want Session nested in Monkey (but note session must be called ‘Subj’):
Peter, it’s better to start with a simple model first and see if it works, especially in this case with minimum amount of data.
We model monkey to account for differences (and to see if there is an outlier); but the
flip-side if this is that this factor hopefully “soaks up” variance attributable to monkey.
When “monkey” is not directly specified in the model as a fixed- or random-effects factor, it does not mean that the variability among the monkeys is not accounted for. Instead the variability is explained in the residuals. Directly modeling it as a fixed-effects factor requires more model parameters, leading to unstable estimation in the process, and you don’t have enough data to play with.
-ranEff ‘~1+Monk|Subj’
Just try
-ranEff ‘~1’ \
and you should feel blessed if you get something interesting in the end.
I’ve run a couple models and they “work” but that doesn’t mean they are correct, or correctly implemented. We can discuss why or why not Monkey must be included as a fixed effect, but this is the standard in the field (of monkey work, with limited numbers of monkeys).
What is the correct syntax for Session nested in Monkey? I’ve run it both ways, one way was complete in about 20 seconds, the other took about 20 hours. The taste by hydration interaction effect was nill in both models (as expected). However the df’s are odd, and the same, in both Session|Monkey and Monkey|Session implementations. (The fixed effects are " MonkeyTasteHydration").
How can I get:
monkey 2, 68
taste 2, 68
hydration 1, 68
Why 68? I have 15 sessions pre (hydration) and 15 sessions post (hydration).
There are 90 lines in my datatable.
90 - ( ( 3Monkey x 3Taste x 2Hydration ) + 5Sessions ) - 1 = 68
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.