1

I'm trying to understand an interaction for a mixed-design study.

variable is a repeated measure and status is between-subjects factor

library("multcomp", lib.loc="~/R/win-library/3.2")
library("nlme", lib.loc="C:/Program Files/R/R-3.2.0rc/library")

baseline<-lme(value~ 1, random = ~1|ID/variable/Status, data = SFAMixCon, method = "ML")
RepeatedAdded<-lme(value~ variable, random = ~1|ID/variable/Status, data = SFAMixCon, method = "ML")
BetweenAdded<-update(Variable, .~. + Status)
InteractionAdded<-update(VST, .~. + Status:variable)

any differences?:

anova(baseline,RepeatAdded, BetweenAdded, InteractionAdded)

found a difference in task, so I thought I'd look at some main effect posthocs:

posthoc <-glht(Variable, linfct = mcp(variable = "Tukey"))
summary(posthoc)
confint(posthoc)

found a significant interaction, so why not look at some interaction posthocs:

posthocX <-glht(VSTX, linfct = mcp(Status:variable ="Tukey"))

problem:

"**Error: unexpected '=' in "posthocX <-glht(VSTX, linfct = mcp(Status:variable ="**"

So, has anyone had to look at an interaction using these tools?

CephBirk
  • 6,422
  • 5
  • 56
  • 74
Derek
  • 11
  • 2
  • 2
    Welcome to SO. Can you please provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)? Dummy data is okay. – alexwhitworth Sep 14 '15 at 21:28
  • If you want to do all pairwise comparisons of the cell means and are willing to look at another packages, you can do this via package *lsmeans* with code like `lsmeans(VSTX, pairwise ~ Status:variable)`. – aosmith Sep 14 '15 at 22:06

0 Answers0