0

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!

MLavoie
  • 9,671
  • 41
  • 36
  • 56
  • 1
    If this is a question about software it is off topic. But you may be able to edit ti to make it on topic. – Michael R. Chernick Apr 14 '17 at 20:47
  • No, it is not about sofware, it is about modeling. I just tried to explain it briefly. I do not understand which parts of the question that I should edit. –  Apr 15 '17 at 05:18
  • The title of your question/post suggests that it is all about lme. That is software isn't it? – Michael R. Chernick Apr 15 '17 at 05:33
  • I mean linear mixed effects model by saying lme. Sorry for the misunderstanding. I I tried to figure out how to specify fixed effects part of linear mixed effects model. To model, I'm using nlme package in R statistical programming language. –  Apr 15 '17 at 06:07

1 Answers1

1

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.

Grubbmeister
  • 857
  • 8
  • 25