After attempting to produce a linear mixed model I was left with a great deal of heterogeneity.
lme1 <- lme(Average.payoff ~ Game + Type + Others.Type + Game:Type + Game:Others.Type + Type:Others.Type, random=~1|Subjects, method="REML", data=Subjectsm1)
The response term
Average.payoff is continuous, whilst all explanatory variables are binary.
When I look to validate, I can clearly see that the spread of the residuals decreases with the larger fitted values. So, I decided to look at using the weights argument. I came up with the following model which seems to be the best fit (
vf1 <- varComb(varIdent(form=~1|Others.Type), varIdent(form=~1|Game), varIdent(form=~1|Type), varIdent(form=~1|Male)) lme1 <- lme(Average.payoff ~ Game + Type + Others.Type + Game:Type + Game:Others.Type + Type:Others.Type, random=~1|Subjects, method="ML", weights=vf1, data=Subjectsm1)
- Can I justify using the varIdent function alongside random effects?
- Can I justify combining varIdent functions so the variance of all explanatory variables are accounted for?
- If I remove a fixed effect explanatory variable for being insignificant should the same variable be removed from the variance structure?
- If I get a better fit (using
loglik) without including the random effects by re-modelling with
gls(), can I justify using the model without the random effects?
The experiment involved $20$ subjects, for each subject I have two samples, one where
Others.Type=0 and one where