Reputation: 33
In a mixed model design, I changed the random covariance structure to diagonal:
library(sjPlot)
library(nlme)
model<- lme(fixed= DV~ IV1*IV2+ IV3 + IV4 + IV5,
control=list(opt="nlminb"), data=data,
random = list(id=pdDiag(~1+IV1*IV2)),
na.action=na.omit)
When I try to use plot_model from the package "sjPlot" with this model:
plot_model(model,type="pred",terms=c("V1","V2"),mdrt.values="meansd")
It writes the error:
Error in gregexpr(pattern = "\\|", re)[[1]] : subscript out of bounds
here is a data sample:
set.seed(42)
n <- 90
data <- data.frame ( id = rep(1:6, each = 15),
DV=rnorm(n),
IV1=rnorm(n),
IV2=rnorm(n),
IV3=rnorm(n),
IV4=rnorm(n),
IV5=rnorm(n)
)
Would be grateful for an answer
Upvotes: 1
Views: 37