I have a model including a three-way interaction term (XYZ). I have used this model to create predictions across the parameter space. Thus, I have four pieces of information to convey: X, Y, Z, and Probability. If I had a simple interaction, I would plot a heatmap with X~Y and color would be Probability, but now I need that as a 3D plot.
example_results <- expand.grid(x = 1:8,
y = seq(from = -1.85, to = 3.58, length.out = 15),
z = seq(from = 0, to = 2.41, length.out = 15)) %>%
mutate(probability = sample(seq(from = 0, to = 1, length.out = 3000), 1800))
plot_ly
seems to understand its own relationships within data, whereas I want just to plot my results. rayshader
seemed perfect, but is apparently unable to decouple height (z) from fill (probability). rasterVis
objects to cuts.
I will greatly appreciate any advice on how to plot all the information in one image in R.
Thanks!