sammo3182 / interplot

interplot: plotting interactive effects
Other
15 stars 4 forks source link

Error in data.matrix(fake_data) %*% t(data.matrix(m.sims@coef)) : non-conformable arguments #31

Open chrispretz opened 5 years ago

chrispretz commented 5 years ago

Really like this package! However, despite my attempts I cannot get the "var2_vals" to function as expected and continue to get the error:

Error in data.matrix(fake_data) %*% t(data.matrix(m.sims@coef)) : non-conformable arguments

the code I am using is

p1 <- interplot(m = glm.int.red, var1 = "rts", var2 = "age", predPro = TRUE,
var2_vals = seq(10, 60, by=10) , sims=5000, ci=0.95)

p1

the glm with the interaction executes as desired...

glm.int.red <- glm(formula = cbind(surv, 1 - surv) ~ as + ds + es + fs + hs + iss + rts + age + bp + as:es + as:hs + as:rts + as:bp + ds:fs + ds:age + ds:bp + es:hs + es:rts + fs:iss + fs:age + hs:age + iss:bp + age:rts, family = binomial(link = "logit"), data = trauma)

Please help as I would really like to plot these interactions...

sammo3182 commented 3 years ago

Sorry, but I cannot detect the issue without a replicable example.