Open somakd opened 4 years ago
Good find! I'll add this to my to do list.
Similar error for glm(y ~ ns(x))
and glmer(y ~ ns(x))
The error is in the function helper_plotly_label
when dissecting, it might be due to the fact that: plotly_data <- model$model
returns multiple columns within a list when poly(x)
or ns(x)
is used within the model, while just one column is returned with I(x^2)
. model$model$ns function
provides an error, but is reachable by model$model[,numberofcolumn]. Unlisting does not work.
When
poly
is used to fit a polynomial via thelm
function,resid_panel
cannot produce the residual panel.Here's a reproducible example:
Produces the following error message:
Error in `[<-.data.frame`(`*tmp*`, , i, value = c("poly(x, 2): -0.0716640223708324", : replacement has 200 rows, data has 100
However, if
I()
is used instead,resid_panel
works fine: