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

## Documentation for package ‘gratia’ version 0.5.1

- DESCRIPTION file.

## Help Pages

A B C D E F G I L N O P Q R S T V W Z

## -- A --

add_constant | Add a constant to estimated values
add_constant.evaluated_parametric_term | Add a constant to estimated values
add_constant.evaluated_smooth | 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_partial_residuals.gam | 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
appraise.gam | Model diagnostic plots
appraise.lm | Model diagnostic plots

## -- B --

basis | Basis expansions for smooths
bird_move | Simulated bird migration data
by_level | Tests for by variable smooths
by_variable | Tests for by variable smooths

## -- C --

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 derivatives of smooths
confint.gam | Point-wise and simultaneous confidence intervals for smooths
confint.gamm | Point-wise and simultaneous confidence intervals for smooths
confint.list | Point-wise and simultaneous confidence intervals for smooths

## -- D --

data_sim | Simulate example data for fitting GAMs
data_slice | Prepare a data slice through covariates
data_slice.default | Prepare a data slice through covariates
data_slice.gam | Prepare a data slice through covariates
data_slice.list | Prepare a data slice through covariates
derivatives | Derivatives of estimated smooths via finite differences
derivatives.default | Derivatives of estimated smooths via finite differences
derivatives.gam | Derivatives of estimated smooths via finite differences
derivatives.gamm | Derivatives of estimated smooths via finite differences
difference_smooths | Differences of factor smooth interactions
difference_smooths.gam | 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_1d_smooth | Plot estimated smooths
draw.evaluated_2d_smooth | Plot estimated smooths
draw.evaluated_fs_smooth | Plot estimated smooths
draw.evaluated_parametric_term | Plot estimated smooths
draw.evaluated_re_smooth | Plot estimated 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

## -- E --

evaluate_parametric_term | Evaluate a smooth
evaluate_parametric_term.gam | Evaluate a smooth
evaluate_smooth | Evaluate a smooth
evaluate_smooth.gam | Evaluate a smooth
evaluate_smooth.gamm | Evaluate a smooth
evaluate_smooth.list | Evaluate a smooth
eval_smooth | S3 methods to evaluate individual smooths
eval_smooth.fs.interaction | S3 methods to evaluate individual smooths
eval_smooth.mgcv.smooth | S3 methods to evaluate individual smooths
eval_smooth.mrf.smooth | S3 methods to evaluate individual smooths
eval_smooth.random.effect | S3 methods to evaluate individual smooths
eval_smooth.t2.smooth | S3 methods to evaluate individual smooths
eval_smooth.tensor.smooth | S3 methods to evaluate individual smooths

## -- F --

family.bam | Extract family objects from models
family.gam | Extract family objects from models
family.gamm | Extract family objects from models
family.list | Extract family objects from models
fderiv | First derivatives of fitted GAM functions
fderiv.gam | First derivatives of fitted GAM functions
fderiv.gamm | First derivatives of fitted GAM functions
fitted_samples | Draw fitted values from the posterior distribution
fitted_samples.gam | Draw fitted values from the posterior distribution
fix_offset | Fix the names of a data frame containing an offset variable.

## -- G --

geom_rug | Plot estimated smooths
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 Opinion Research Center of the University of Chicago

## -- I --

inv_link | Extract link and inverse link functions from models
inv_link.bam | Extract link and inverse link functions from models
inv_link.family | Extract link and inverse link functions from models
inv_link.gam | Extract link and inverse link functions from models
inv_link.gamm | Extract link and inverse link functions from models
inv_link.glm | Extract link and inverse link functions from models
inv_link.list | Extract link and inverse link functions from models
is_by_smooth | Tests for by variable smooths
is_continuous_by_smooth | Tests for by variable smooths
is_factor_by_smooth | Tests for by variable smooths
is_factor_term | Is a model term a factor (categorical)?
is_factor_term.bam | Is a model term a factor (categorical)?
is_factor_term.gam | Is a model term a factor (categorical)?
is_factor_term.gamm | Is a model term a factor (categorical)?
is_factor_term.list | Is a model term a factor (categorical)?
is_factor_term.terms | Is a model term a factor (categorical)?
is_mgcv_smooth | Check if objects are smooths or are a particular type of smooth
is_mrf_smooth | Check if objects are smooths or are a particular type of smooth
is_offset | Is a model term an offset?

## -- L --

link | Extract link and inverse link functions from models
link.bam | Extract link and inverse link functions from models
link.family | Extract link and inverse link functions from models
link.gam | Extract link and inverse link functions from models
link.gamm | Extract link and inverse link functions from models
link.glm | Extract link and inverse link functions from models
link.list | Extract link and inverse link functions from models
load_mgcv | Load mgcv quietly

## -- N --

n_smooths | How many smooths in a fitted model
n_smooths.bam | How many smooths in a fitted model
n_smooths.default | How many smooths in a fitted model
n_smooths.gam | How many smooths in a fitted model
n_smooths.gamm | How many smooths in a fitted model

## -- O --

observed_fitted_plot | Plot of fitted against observed response values

## -- P --

parametric_terms | Names of any parametric terms in a GAM
parametric_terms.default | Names of any parametric terms in a GAM
parametric_terms.gam | Names of any parametric terms in a GAM
partial_residuals | Partial residuals
partial_residuals.gam | Partial residuals
penalty | Extract and tidy penalty matrices
penalty.gam | Extract and tidy penalty matrices
penalty.mgcv.smooth | Extract and tidy penalty matrices
penalty.t2.smooth | Extract and tidy penalty matrices
penalty.tensor.smooth | Extract and tidy penalty matrices
posterior_samples | Draw samples from the posterior distribution of an estimated model
posterior_samples.gam | Draw samples from the posterior distribution of an estimated model
predicted_samples | Draw fitted values from the posterior distribution
predicted_samples.gam | Draw fitted values from the posterior distribution

## -- Q --

qq_plot | Quantile-quantile plot of model residuals
qq_plot.gam | Quantile-quantile plot of model residuals
qq_plot.glm | Quantile-quantile plot of model residuals

## -- R --

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

## -- S --

seq_min_max | Create a sequence of evenly-spaced values
seq_min_max_eps | Create a sequence of evenly-spaced values adjusted to accommodate a small adjustment
shift_values | Shift numeric values in a data frame by an amount 'eps'
simulate.gam | Simulate from the posterior distribution of a GAM
simulate.gamm | Simulate from the posterior distribution of a GAM
simulate.scam | Simulate from the posterior distribution of a GAM
smallAges | Lead-210 age-depth measurements for Small Water
smooths | Names of smooths in a GAM
smooth_coefs | Indices of the parametric terms for a particular smooth
smooth_dim | Dimension of a smooth
smooth_dim.gam | Dimension of a smooth
smooth_dim.gamm | Dimension of a smooth
smooth_dim.mgcv.smooth | Dimension of a smooth
smooth_estimates | New 'evaluate_smooth()' alike
smooth_estimates.gam | New 'evaluate_smooth()' alike
smooth_samples | Posterior draws for individual smooths
smooth_samples.gam | Posterior draws for individual smooths

## -- T --

term_variables | Names of variables involved in a specified model term
term_variables.bam | Names of variables involved in a specified model term
term_variables.gam | Names of variables involved in a specified model term
term_variables.terms | 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 applying a function
transform_fun.evaluated_parametric_term | Transform estimated values and confidence intervals by applying a function
transform_fun.evaluated_smooth | Transform estimated values and confidence intervals by applying a function

## -- V --

vars_from_label | Returns names of variables from a smooth label

## -- W --

which_smooths | Identify a smooth term by its label
which_smooths.bam | Identify a smooth term by its label
which_smooths.default | Identify a smooth term by its label
which_smooths.gam | Identify a smooth term by its label
which_smooths.gamm | Identify a smooth term by its label

## -- Z --

zooplankton | Madison lakes zooplankton data