Skip to main content
Answered OP's questions in comments
Source Link
mkt
  • 20.4k
  • 11
  • 81
  • 187

Mixed-effects models may be explained in multiple ways. In your example, you could think of them as a way of accounting for variance explainable by some categorical variable (such as habitat) without paying the parameter penalty of including the variable as a fixed effect.

Suppose you had 20 different habitat types. You would have 19 implicit parameters in a regular modelling framework, while in a mixed-effects model you would be accounting for a single variance term (i.e. you would assume that the means of all 20 habitats are drawn from some normal distribution).

Now to get to the specifics of your case: since you have only 3 habitats, you don't really pay much of a penalty (2 parameters!). And 3 units is a very small number for estimating a variance term in any case. So I actually suggest that you abandon the mixed-effects modelling framework here and include 'habitat' as a fixed effect. This leaves you with a simple linear model:

Length ~ Age * Habitat

A strong interaction term would be clear evidence for your biological hypothesis of growth rate being influenced by habitat, I think. And if you know how to do a regular power analysis, you can go ahead and do this instead of worrying about the complexities of power analysis in mixed models (for which there are methods, e.g. http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12504/full).

Let me know if this addresses your question; I will try to clarify anything above that isn't clear, or point you towards additional resources.

EDIT in reply to your comment:

Answering your questions in reverse order

  1. The simple linear model example I gave above will allow for different slopes in different habitats. That's what the interaction term essentially is. If you leave out an interaction term, you will force all slopes to be the same.

  2. If you expand beyond 4-5 groups AND you do not care about making statistical comparisons between pairs of groups (which is probably not worth it), then you should almost certainly switch to a mixed modelling framework. In which case, the model you need would be your model 1 above, i.e.

Length ~ Age + (1 + Age | Habitat)

Statistically testing whether your random slope term is significant is trickier, but I believe the RLRsim package lets you do this (I have not tried it, but the authors know their stuff). The simR package I linked to above will let you do the mixed model power analyses relatively easily.

Mixed-effects models may be explained in multiple ways. In your example, you could think of them as a way of accounting for variance explainable by some categorical variable (such as habitat) without paying the parameter penalty of including the variable as a fixed effect.

Suppose you had 20 different habitat types. You would have 19 implicit parameters in a regular modelling framework, while in a mixed-effects model you would be accounting for a single variance term (i.e. you would assume that the means of all 20 habitats are drawn from some normal distribution).

Now to get to the specifics of your case: since you have only 3 habitats, you don't really pay much of a penalty (2 parameters!). And 3 units is a very small number for estimating a variance term in any case. So I actually suggest that you abandon the mixed-effects modelling framework here and include 'habitat' as a fixed effect. This leaves you with a simple linear model:

Length ~ Age * Habitat

A strong interaction term would be clear evidence for your biological hypothesis of growth rate being influenced by habitat, I think. And if you know how to do a regular power analysis, you can go ahead and do this instead of worrying about the complexities of power analysis in mixed models (for which there are methods, e.g. http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12504/full).

Let me know if this addresses your question; I will try to clarify anything above that isn't clear, or point you towards additional resources.

Mixed-effects models may be explained in multiple ways. In your example, you could think of them as a way of accounting for variance explainable by some categorical variable (such as habitat) without paying the parameter penalty of including the variable as a fixed effect.

Suppose you had 20 different habitat types. You would have 19 implicit parameters in a regular modelling framework, while in a mixed-effects model you would be accounting for a single variance term (i.e. you would assume that the means of all 20 habitats are drawn from some normal distribution).

Now to get to the specifics of your case: since you have only 3 habitats, you don't really pay much of a penalty (2 parameters!). And 3 units is a very small number for estimating a variance term in any case. So I actually suggest that you abandon the mixed-effects modelling framework here and include 'habitat' as a fixed effect. This leaves you with a simple linear model:

Length ~ Age * Habitat

A strong interaction term would be clear evidence for your biological hypothesis of growth rate being influenced by habitat, I think. And if you know how to do a regular power analysis, you can go ahead and do this instead of worrying about the complexities of power analysis in mixed models (for which there are methods, e.g. http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12504/full).

Let me know if this addresses your question; I will try to clarify anything above that isn't clear, or point you towards additional resources.

EDIT in reply to your comment:

Answering your questions in reverse order

  1. The simple linear model example I gave above will allow for different slopes in different habitats. That's what the interaction term essentially is. If you leave out an interaction term, you will force all slopes to be the same.

  2. If you expand beyond 4-5 groups AND you do not care about making statistical comparisons between pairs of groups (which is probably not worth it), then you should almost certainly switch to a mixed modelling framework. In which case, the model you need would be your model 1 above, i.e.

Length ~ Age + (1 + Age | Habitat)

Statistically testing whether your random slope term is significant is trickier, but I believe the RLRsim package lets you do this (I have not tried it, but the authors know their stuff). The simR package I linked to above will let you do the mixed model power analyses relatively easily.

Edited two sentences for clarity.
Source Link
mkt
  • 20.4k
  • 11
  • 81
  • 187

Mixed-effects models may be explained in multiple ways. In your example, you could think of them as a way of accounting for variance explainable by some categorical variable (such as habitat) without paying the parameter penalty of explicitly including the variable in the analysisas a fixed effect.

Suppose you had 20 different habitat types. You would have 19 implicit parameters in a regular modelling framework, while in a mixed-effects model you would be accounting for a single variance term (i.e. you would assume that the means of all 20 habitats are drawn from some normal distribution).

Now to get to the specifics of your case: since you have only 3 habitats, you don't really pay much of a penalty (2 parameters!). And 3 units is nota very goodsmall number for estimating a variance term in any case. So I actually suggest that you abandon the mixed-effects modelling framework here, and instead useinclude 'habitat' as a fixed effect. This leaves you with a simple linear model:

Length ~ Age * Habitat

A strong interaction term would be clear evidence for your biological hypothesis of growth rate being influenced by habitat, I think. And if you know how to do a regular power analysis, you can go ahead and do this instead of worrying about the complexities of power analysis in mixed models (for which there are methods, e.g. http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12504/full).

Let me know if this addresses your question; I will try to clarify anything above that isn't clear, or point you towards additional resources.

Mixed-effects models may be explained in multiple ways. In your example, you could think of them as a way of accounting for variance explainable by some categorical variable (such as habitat) without paying the parameter penalty of explicitly including the variable in the analysis.

Suppose you had 20 different habitat types. You would have 19 implicit parameters in a regular modelling framework, while in a mixed-effects model you would be accounting for a single variance term (i.e. you would assume that the means of all 20 habitats are drawn from some normal distribution).

Now to get to the specifics of your case: since you have only 3 habitats, you don't really pay much of a penalty (2 parameters!). And 3 units is not very good for estimating a variance term in any case. So I actually suggest that you abandon the mixed-effects modelling framework here, and instead use a simple linear model:

Length ~ Age * Habitat

A strong interaction term would be clear evidence for your biological hypothesis of growth rate being influenced by habitat, I think. And if you know how to do a regular power analysis, you can go ahead and do this instead of worrying about the complexities of power analysis in mixed models (for which there are methods, e.g. http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12504/full).

Let me know if this addresses your question; I will try to clarify anything above that isn't clear, or point you towards additional resources.

Mixed-effects models may be explained in multiple ways. In your example, you could think of them as a way of accounting for variance explainable by some categorical variable (such as habitat) without paying the parameter penalty of including the variable as a fixed effect.

Suppose you had 20 different habitat types. You would have 19 implicit parameters in a regular modelling framework, while in a mixed-effects model you would be accounting for a single variance term (i.e. you would assume that the means of all 20 habitats are drawn from some normal distribution).

Now to get to the specifics of your case: since you have only 3 habitats, you don't really pay much of a penalty (2 parameters!). And 3 units is a very small number for estimating a variance term in any case. So I actually suggest that you abandon the mixed-effects modelling framework here and include 'habitat' as a fixed effect. This leaves you with a simple linear model:

Length ~ Age * Habitat

A strong interaction term would be clear evidence for your biological hypothesis of growth rate being influenced by habitat, I think. And if you know how to do a regular power analysis, you can go ahead and do this instead of worrying about the complexities of power analysis in mixed models (for which there are methods, e.g. http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12504/full).

Let me know if this addresses your question; I will try to clarify anything above that isn't clear, or point you towards additional resources.

Source Link
mkt
  • 20.4k
  • 11
  • 81
  • 187

Mixed-effects models may be explained in multiple ways. In your example, you could think of them as a way of accounting for variance explainable by some categorical variable (such as habitat) without paying the parameter penalty of explicitly including the variable in the analysis.

Suppose you had 20 different habitat types. You would have 19 implicit parameters in a regular modelling framework, while in a mixed-effects model you would be accounting for a single variance term (i.e. you would assume that the means of all 20 habitats are drawn from some normal distribution).

Now to get to the specifics of your case: since you have only 3 habitats, you don't really pay much of a penalty (2 parameters!). And 3 units is not very good for estimating a variance term in any case. So I actually suggest that you abandon the mixed-effects modelling framework here, and instead use a simple linear model:

Length ~ Age * Habitat

A strong interaction term would be clear evidence for your biological hypothesis of growth rate being influenced by habitat, I think. And if you know how to do a regular power analysis, you can go ahead and do this instead of worrying about the complexities of power analysis in mixed models (for which there are methods, e.g. http://onlinelibrary.wiley.com/doi/10.1111/2041-210X.12504/full).

Let me know if this addresses your question; I will try to clarify anything above that isn't clear, or point you towards additional resources.