Can anyone show me how to test for significant simple slopes of a 3-way interaction, with covariates. my equation tmod<-(glm(PCL~ rank.f + gender.f + MONTHS + CEXPOSE.M + bf.m + MONTHS*CEXPOSE.M*bf.m, data=mhatv, family=gaussian ,na.action=na.omit)) Thank you Mike [[alternative HTML version deleted]]
On Nov 6, 2010, at 9:06 AM, Michael Wood wrote:> Can anyone show me how to test for significant simple slopes of a 3- > way > interaction, with covariates. >You might start by defining what you mean by "simple slopes" when discussing a model with a three way interaction. You might also include a description of the variables involved.> my equation > tmod<-(glm(PCL~ rank.f + gender.f + MONTHS + CEXPOSE.M + bf.m + > MONTHS*CEXPOSE.M*bf.m, > data=mhatv, family=gaussian ,na.action=na.omit)) > > Thank you > MikeDavid Winsemius, MD West Hartford, CT
You would get more helpful replies if you indicated which among MONTHS, CEXPOSE.M and bf.m were factors vs. covariates, and for which factor or factors you wanted to test the simple slopes. You will find that linearHypothesis in the car package can test these things, and the effects package can produce visualizations of the fitted model to help you understand these tests. Maybe this will get you started: library(effects) tmod.effects <- allEffects(tmod) plot(tmod.effects) but you really just want to look tat the 3-way term. On 11/6/2010 9:06 AM, Michael Wood wrote:> Can anyone show me how to test for significant simple slopes of a 3-way > interaction, with covariates. > > my equation > tmod<-(glm(PCL~ rank.f + gender.f + MONTHS + CEXPOSE.M + bf.m + > MONTHS*CEXPOSE.M*bf.m, > data=mhatv, family=gaussian ,na.action=na.omit)) > > Thank you > Mike > > [[alternative HTML version deleted]] >