Skip to content
Prev 17358 / 20628 Next

LMER - Plotting of a quadratic effect interacting with time

Worked like a charm!  Thanks, John.  

-----Original Message-----
From: Fox, John [mailto:jfox at mcmaster.ca] 
Sent: Thursday, January 31, 2019 11:57 AM
To: Boden, Matthew T. <Matthew.Boden at va.gov>
Cc: r-sig-mixed-models <r-sig-mixed-models at r-project.org>
Subject: [EXTERNAL] RE: LMER - Plotting of a quadratic effect interacting with time

Dear Mathew,
Try, plot(Effect(c("Time", "FTE"), Q1)) .

More generally, why not fit the model as  Q1 <- lmer(Patients ~ Time*poly(FTE, 2) +  (FTE  | ID), data = SHARE)  or Q1 <- lmer(Patients ~ Time*poly(FTE, 2, raw=TRUE) +  (FTE  | ID), data = SHARE) ? Also, do you really want the linear term in FTE to be random and the quadratic term only fixed?

I hope this helps,
 John
Message-ID: <BN8PR09MB35544641151425DA1311436187910@BN8PR09MB3554.namprd09.prod.outlook.com>
In-Reply-To: <ACD1644AA6C67E4FBD0C350625508EC836A7F3AB@FHSDB2D11-2.csu.mcmaster.ca>