You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Did you load lme4 or the like after loading mcp, getting a message like "The following objects are masked from ‘package:mcp fixef ranef’"? It may be trying to use lme4::ranef() on an mcpfit object. It's a bug that mcp defines ranef instead of ranef.mcpfit so thanks for reporting!
Did you load lme4 or the like after loading mcp, getting a message like "The following objects are masked from ‘package:mcp fixef ranef’"? It may be trying to use lme4::ranef() on an mcpfit object. It's a bug that mcp defines ranef instead of ranef.mcpfit so thanks for reporting!
It can be temporarily can be solved by inserting
ranef.mcpfit=mcp::ranef
ranef(fit)
(You have a typo in ranef(ift))
Yeessss!! Thank you. That was the problem (the lme4, not the typo).
lindeloev
changed the title
no applicable method for 'ranef' applied to an object of class "mcpfit"
Rename ranef to ranef.mcpfitFeb 25, 2021
Hi!
I was wondering if you could help me with this. When I run this code:
model = list(
acc | trials(N) ~ 1,
1 + (1|id) ~ 0 + numerosity)
fit<- mcp(model, data = df, family = binomial())
summary(fit)
ranef(ift)
I get the following error:
Error in UseMethod("ranef") :
no applicable method for 'ranef' applied to an object of class "mcpfit"
Before that I tried using the following code with a slightly different dataset so I could use the bernoulli family:
model = list(
acc ~ 1,
1 + (1|id) ~ 0 + numerosity
)
fit<- mcp(model, data = df, family = bernoulli())
summary(fit)
ranef(ift)
I got the same error.
Thanks in advance!!
The text was updated successfully, but these errors were encountered: