| predict_polar_gam | R Documentation | 
It returns a tibble with the predictions from all the terms in a polar_gam model.
predict_polar_gam(
  model,
  origin = NULL,
  exclude_terms = NULL,
  length_out = 50,
  values = NULL,
  return_ci = FALSE,
  ci_z = 1.96
)
| model | A polar_gam model object. | 
| origin | The coordinates of the origin as a vector of  | 
| exclude_terms | Terms to be excluded from the prediction. Term names should be given as they appear in the model summary (for example,  | 
| length_out | An integer indicating how many values along the numeric predictors to use for predicting the outcome term (the default is  | 
| values | User supplied values for numeric terms as a named list. | 
| return_ci | Whether to return a tibble with cartesian confidence intervals (for use with geom_polar_ci). | 
| ci_z | The z-value for calculating the CIs (the default is  | 
The function converts the coordinates from polar to cartesian automatically.
To see an example of plotting, see the examples in geom_polar_ci.
A tibble with predictions from a polar_gam model.
library(dplyr)
tongue_it01 <- filter(tongue, speaker == "it01")
it01_pol <- polar_gam(Y ~ s(X, by = c2_place) + s(X, word, bs = "fs"),
data = tongue_it01)
# get predictions
it01_pred <- predict_polar_gam(it01_pol)
# get predictions excluding the random smooth for word (the coefficient for
# the random smooth is set to 0)
it01_excl_rand <- predict_polar_gam(it01_pol, exclude_terms = "s(X,word)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.