Learn R Programming

⚠️There's a newer version (2.5) of this package.Take me there.

itsadug (version 2.4)

Interpreting Time Series and Autocorrelated Data Using GAMMs

Description

GAMM (Generalized Additive Mixed Modeling; Lin & Zhang, 1999) as implemented in the R package 'mgcv' (Wood, S.N., 2006; 2011) is a nonlinear regression analysis which is particularly useful for time course data such as EEG, pupil dilation, gaze data (eye tracking), and articulography recordings, but also for behavioral data such as reaction times and response data. As time course measures are sensitive to autocorrelation problems, GAMMs implements methods to reduce the autocorrelation problems. This package includes functions for the evaluation of GAMM models (e.g., model comparisons, determining regions of significance, inspection of autocorrelational structure in residuals) and interpreting of GAMMs (e.g., visualization of complex interactions, and contrasts).

Copy Link

Version

Install

install.packages('itsadug')

Monthly Downloads

5,346

Version

2.4

License

GPL (>= 2)

Maintainer

Jacolien van Rij

Last Published

April 29th, 2020

Functions in itsadug (2.4)

derive_timeseries

Derive the time series used in the AR1 model.
convertNonAlphanumeric

Prepare string for regular expressions (backslash for all non-letter and non-digit characters)
acf_plot

Generate an ACF plot of an aggregated time series.
corfit

Calculate the correlation between the fitted model and data.
acf_resid

Generate an ACF plot of model residuals. Works for lm, lmer, gam, bam, ....
acf_n_plots

Generate N ACF plots of individual or aggregated time series.
diagnostics

Visualization of the model fit for time series data.
compareML

Function for comparing two GAMM models.
check_resid

Inspect residuals of regression models.
diff_terms

Compare the formulas of two models and return the difference(s).
get_coefs

Get coefficients for the parametric terms (intercepts and random slopes).
observations

Number of observations in the model.
fadeRug

Fade out the areas in a surface without data.
modeledf

Retrieve the degrees of freedom specified in the model.
find_difference

Return the regions in which the smooth is significantly different from zero.
fvisgam

Visualization of nonlinear interactions, summed effects.
gamtabs

Convert model summary into Latex/HTML table for knitr/R Markdown reports.
get_random

Get coefficients for the random intercepts and random slopes.
dispersion

Calculate the dispersion of the residuals
get_difference

Get model predictions for differences between conditions.
get_pca_predictions

Return PCA predictions.
get_fitted

Get model all fitted values.
itsadug

Interpreting Time Series, Autocorrelated Data Using GAMMs (itsadug)
get_modelterm

Get estimated for selected model terms.
info

Information on how to cite this package
eeg

Raw EEG data, single trial, 50Hz.
infoMessages

Turn on or off information messages.
inspect_random

Inspection and interpretation of random factor smooths.
missing_est

Return indices of data that were not fitted by the model.
plot_smooth

Visualization of smooths.
get_predictions

Get model predictions for specific conditions.
plot_topo

Visualization of EEG topo maps.
rug_model

Add rug to plot, based on model.
plot_parametric

Visualization of group estimates.
simdat

Simulated time series data.
plot_pca_surface

Visualization of the effect predictors in nonlinear interactions with principled components.
summary_data

Print a descriptive summary of a data frame.
timeBins

Label timestamps as timebins of a given binsize.
plot_data

Visualization of the model fit for time series data.
start_event

Determine the starting point for each time series.
plot_diff

Plot difference curve based on model predictions.
start_value_rho

Extract the Lag 1 value from the ACF of the residuals of a gam, bam, lm, lmer model, ...
print_summary

pvisgam

Visualization of partial nonlinear interactions.
refLevels

Return a list with reference levels for each factor.
plot_diff2

Plot difference surface based on model predictions.
report_stats

Returns a description of the statistics of the smooth terms for reporting.
res_df

Retrieve the residual degrees of freedom from the model.
plot_modelfit

Visualization of the model fit for time series data.
wald_gam

Function for post-hoc comparison of the contrasts in a single GAMM model.
resid_gam

Extract model residuals and remove the autocorrelation accounted for.