eee
eee

Reputation:

How to model fixed effects in lme?

I have a longitudinal measurements and basic demographic variables age and gender and ı'd like to model the measurements with lme.

What are the things that I must take account of when modeling fixed effects part in lme? I've read so many questions and answers on this topic, but I'm not quite sure which one to apply.

For my analysis, to model the fixed effects part, first of all I used the graphics to examine the relationship betweeen response and explanatory variables(one by one). Also I used all possible options for modeling fixed effects and utilized information criterias (AIC, BIC) to decide which model to use among all these options. I utilized both the graphics and information cirtria values and also I tried the univariate analyses (such as t-test, chi squared tests) for variable selection to find the potential risk factors for the response, but I'm not sure it is true to apply the univariate analyses.

After applying all these methods, I decided to use only main effects in the fixed effects part because that model gave the smallest AIC and BIC also I did not find any trend in graphics which shows the interaction between candidate variables. Is it possible to include only the main effects or is it not logic? I really do not know the answer. Therefore any help would be greatly appreciated.

Thanks in advance!

Upvotes: 0

Views: 936

Answers (1)

Grubbmeister
Grubbmeister

Reputation: 877

The question is somewhat confused, and really belongs on Cross Validated.

However. You seem to be trying to build a model, and compare different models to work out what is the best. A simple way is to come up with all possible models and then run an Anova from the car package:

mod1<- lmer(response~Factor1*Factor2 + (1|Subject), df)
mod2<- lmer(response~Factor1+Factor2+ (1|Subject), df)
mod3<- lmer(response~Factor1:Factor2+ (1|Subject), df)
mod4<- lmer(response~Factor1:Factor2 + Factor1+ (1|Subject), df)
mod5<- lmer(response~Factor1:Factor2 + Factor2+ (1|Subject), df)
mod6<- lmer(response~Factor1+ (1|Subject), df)
mod7<- lmer(response~Factor2+ (1|Subject), df)

Anova(mod1, mod2, mod3, mod4, mod4,mod5,mod6,mod7)

Note, however, a problem with doing things as above. If there is a very high chance that a term should affect the outcome, you should probably leave it in, whether or not it's actually makes a better model. You need to think about what variables/interactions you are interested in, and what ones you can safely say are important. Then you can pick from the list of acceptable models to compare.

As an example: I have data from before and after a forest fire, with unburnt control sites. So my model looks like this: response~Treatment*Time

For some response variables, the interaction is not significant. I do not drop it, however, because the interaction is biologically meaningful - even if it isn't significant.

Upvotes: 1

Related Questions