1. Learn
  2. /
  3. Courses
  4. /
  5. Nonlinear Modeling with Generalized Additive Models (GAMs) in R

Connected

Exercise

Customizing 3D plots

Uncertainty is easy to see in plots of univariate smooths, but more challenging to represent in 2D relationships. Here we'll visualize uncertainty in a geospatial interaction.

The model (mod2d) from exercise 2 is available in your workspace.

Instructions 1/2

undefined XP
  • 1

    Use vis.gam() to make a 3D perspective plot of the x, y relationship in the model, using the se argument to make confidence interval surfaces at +/- 2 standard errors.

  • 2

    Make another version of the same plot, rotated 135 degrees to view it from another angle.