Closed kdarras closed 5 years ago
if there's a reproducible example I will try to look for problems on the lme4
side. Surprising in that I can't think of any recent lme4
changes that would cause changes in output format/model object structure ...
Here it comes:
data("shipley")
shipley.psem <- psem(
lme(DD ~ lat, random = ~ 1 | site / tree, na.action = na.omit,
data = shipley),
lmer(Date ~ DD +(1 | site / tree), na.action = na.omit,
data = shipley),
lme(Growth ~ Date, random = ~ 1 | site / tree, na.action = na.omit,
data = shipley),
glmer(Live ~ Growth + (1 | site) + (1 | tree),
family = binomial(link = "logit"), data = shipley)
)
summary(shipley.psem)
I just replaced the lme with an lmer, and the predictor of the corresponding model is now split in 2 rows. Interestingly the glmer works.
Running into this same issue with lmer
. As an additional note, if you have two predictor variables in the call e.g.,
lmer(Date ~ DD +(1 | site / tree), na.action = na.omit,
data = shipley)
then it throws an error: Error in (function (..., row.names = NULL, check.rows = FALSE, check.names = TRUE, : arguments imply differing number of rows: 3, 2
I also have the same (additional?) problem
Sorry everyone, this was my bad, it has to do with the new multigroup analysis that was integrated, not lme4 (sorry to cast shade ben!) Its now fixed…please reinstall the dev version from Github:
devtools::install_github(“jslefche/piecewiseSEM@devel”)
And let me know if the issue persists!
Jonathan S. Lefcheck, Ph.D. Tennenbaum Coordinating Scientist MarineGEO: https://marinegeo.si.edu/ Smithsonian Institution Phone: +1 (443) 482-2443 www.jonlefcheck.nethttp://www.jonlefcheck.net
From: kdarrasmailto:notifications@github.com Sent: Tuesday, January 29, 2019 2:58 AM To: jslefche/piecewiseSEMmailto:piecewiseSEM@noreply.github.com Cc: Subscribedmailto:subscribed@noreply.github.com Subject: Re: [jslefche/piecewiseSEM] Predictors from lmer coded as 1 and 2 in coefficients table (#171)
I also have the same (additional?) problem
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/jslefche/piecewiseSEM/issues/171#issuecomment-458442301, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACPAV6I3DinrxTEDDg7YQqdP4BoiEEY5ks5vH_8OgaJpZM4aPs6t.
Many thanks Jon!!
Glad I didn't get around to trying to figure it out yet :-)
This looks related to #169 I know this is not a particularly beautiful example, but here it comes:
Predictors from lmer models are split into 2 rows and named 1 and 2 (actually, herbicide is a numerical variable with 0 and 1 values). It also happens with other variables, and never happens with lme, glm, and lm.