Graceful 'ggplot'-Based Graphics and Other Functions for GAMs Fitted Using 'mgcv'

add_constant | Add a constant to estimated values |

add_fitted | Add fitted values from a model to a data frame |

add_fitted.gam | Add fitted values from a GAM to a data frame |

add_partial_residuals | Add partial residuals |

add_residuals | Add residuals from a model to a data frame |

add_residuals.gam | Add residuals from a GAM to a data frame |

appraise | Model diagnostic plots |

basis | Basis expansions for smooths |

bird_move | Simulated bird migration data |

check_user_select_smooths | Select smooths based on user's choices |

coef.scam | Extract coefficients from a fitted 'scam' model. |

confint.fderiv | Point-wise and simultaneous confidence intervals for... |

confint.gam | Point-wise and simultaneous confidence intervals for smooths |

datagen | Generate data over the range of variables used in smooths |

data_sim | Simulate example data for fitting GAMs |

data_slice | Prepare a data slice through covariates |

derivatives | Derivatives of estimated smooths via finite differences |

difference_smooths | Differences of factor smooth interactions |

draw | Generic plotting via 'ggplot2' |

draw.derivatives | Plot derivatives of smooths |

draw.difference_smooth | Plot differences of smooths |

draw.evaluated_smooth | Plot estimated smooths |

draw.gam | Plot estimated smooths from a fitted GAM |

draw.mgcv_smooth | Plot basis functions |

draw.penalty_df | Display penalty matrices of smooths using 'ggplot' |

draw.smooth_samples | Plot posterior smooths |

eval_smooth | S3 methods to evaluate individual smooths |

evaluate_smooth | Evaluate a smooth |

family.gam | Extract family objects from models |

fderiv | First derivatives of fitted GAM functions |

fix_offset | Fix the names of a data frame containing an offset variable. |

get_by_smooth | Extract an factor-by smooth by name |

get_smooth | Extract an mgcv smooth by name |

get_smooths_by_id | Extract an mgcv smooth given its position in the model object |

gss_vocab | Data from the General Social Survey (GSS) from the National... |

is_by_smooth | Tests for by variable smooths |

is_factor_term | Is a model term a factor (categorical)? |

is_mgcv_smooth | Check if objects are smooths or are a particular type of... |

is_offset | Is a model term an offset? |

link | Extract link and inverse link functions from models |

load_mgcv | Load mgcv quietly |

n_smooths | How many smooths in a fitted model |

observed_fitted_plot | Plot of fitted against observed response values |

parametric_terms | Names of any parametric terms in a GAM |

partial_residuals | Partial residuals |

penalty | Extract and tidy penalty matrices |

posterior_samples | Draw samples from the posterior distribution of an estimated... |

predicted_samples | Draw fitted values from the posterior distribution |

qq_plot | Quantile-quantile plot of model residuals |

ref_sims | Reference simulation data |

rep_first_factor_value | Repeat the first level of a factor n times |

residuals_hist_plot | Histogram of model residuals |

residuals_linpred_plot | Plot of residuals versus linear predictor values |

seq_min_max | Create a sequence of evenly-spaced values |

seq_min_max_eps | Create a sequence of evenly-spaced values adjusted to... |

shift_values | Shift numeric values in a data frame by an amount 'eps' |

simulate | Simulate from the posterior distribution of a GAM |

smallAges | Lead-210 age-depth measurements for Small Water |

smooth_coefs | Indices of the parametric terms for a particular smooth |

smooth_dim | Dimension of a smooth |

smooth_estimates | New 'evaluate_smooth()' alike |

smooths | Names of smooths in a GAM |

smooth_samples | Posterior draws for individual smooths |

term_variables | Names of variables involved in a specified model term |

tidy_basis | A tidy basis representation of a smooth object |

transform_fun | Transform estimated values and confidence intervals by... |

vars_from_label | Returns names of variables from a smooth label |

which_smooths | Identify a smooth term by its label |

zooplankton | Madison lakes zooplankton data |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.