0
$\begingroup$

I am very new to r. I was wondering what I should look into to perform an ANOVA random effects. I have some data that have different treatment groups, and an observed behavioral rates as a dependent variable. Each observation occurs at a particular spatial bin (e.g. bin 1 would represent 0-2mm away from a stimulus treatment while spatial bin 10 would be 18-20mm away)

I am attempting to pool the observations for each treatment and determine if there is a significant difference between the observations at each spatial bin. I want to account for the assay number within each treatment as a possible random effect, and avoid possible pseudo-replication of each measured observation. Additionally, I wanted to determine if there was a linear relationship between the observed rate of behavior with spatial bin.

I was originally using an ANCOVA to look for differences however that no longer seems appropriate. Please let me know what functions/packages I would need to look into. I was looking into using lme4 or something like it to build this model and wanted some feedback on this approach. Any suggestions on a better method for approaching this question would also be greatly appreciated!

$\endgroup$
0
$\begingroup$

This sounds like primarily a software question, and so is probably off-topic for this site. You can ask programming questions on Stack Overflow.

Although someone may want to weigh in on the statistical / modeling questions in your post.

lme4 is probably the premier package for building mixed effects models. Along with it you may want to use lmerTest package, and the emmeans package.

nlme is also a very popular package. With it, you may want to use car::Anova, although some claim it is better to use anova with nested models. You also want to investigate the emmeans package for lme models.

I don't have a favorite between these two packages. lme4 is better if you have crossed random effects. nlme allows you to put in correlation structures, which is helpful in some repeated measures designs.

For a few simple examples, see here, here, and here. (Caveat: these are my own webpages.)

$\endgroup$
  • $\begingroup$ Thank you for your response. I had looked into some of these packages already so its nice to know I was in the right direction. I will be looking at those examples later! $\endgroup$ – drtran Sep 10 '18 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.