Learn R Programming

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

itsadug (version 2.0)

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

2,230

Version

2.0

License

GPL (>= 2)

Maintainer

Jacolien van Rij

Last Published

March 20th, 2016

Functions in itsadug (2.0)

derive_timeseries

Derive the time series used in the AR1 model.
group_sort

Sort split by grouping predictor.
acf_resid

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

Transform coordinates into proportions of the figure or plot region.
resid_gam

Extract model residuals and remove the autocorrelation accounted for.
fvisgam

Visualization of nonlinear interactions, summed effects.
rug_model

Add rug to plot, based on model.
plot_error

Utility function
compareML

Function for comparing two GAMM models.
find_difference

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

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

Turn on or off information messages.
getRange

Function for rounding and/or segmenting a range.
get_predictions

Get model predictions for specific conditions.
check_normaldist

Compare distribution of data with normal distribution.
check_resid

Inspect residuals of regression models.
add_bars

Adding bars to an existing plot.
se

Calculate standard error of the mean.
itsadug

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

Draw arrows between different plots.
print_summary

color_contour

Creates a contour plot with colored background.
report_stats

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

Utility function
acf_plot

Generate an ACF plot of an aggregated time series.
get_modelterm

Get estimated for selected model terms.
get_difference

Get model predictions for differences between conditions.
plot_data

Visualization of the model fit for time series data.
start_event

Determine the starting point for each time series.
alpha

Adjusting the transparency of colors.
plot_topo

Visualization of EEG topo maps.
diagnostics

Visualization of the model fit for time series data.
dotplot_error

Utility function
eeg

Raw EEG data, single trial, 50Hz.
plot_diff

Plot difference curve based on model predictions.
inspect_random

Inspection and interpretation of random factor smooths.
wald_gam

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

Get the figure region as coordinates of the current plot region, or as corrdinates of the figure region.
getDec

Return the number of decimal places.
plot_smooth

Visualization of smooths.
move_n_point

Move a vector n elements forward or backward.
getCoords

Convert proportions into coordinates of the plot or figure region.
get_pca_predictions

Return PCA predictions.
plotsurface

Creates a colored surface plot.
timeBins

Label timestamps as timebins of a given binsize.
find_n_neighbors

Return n neighbors around given indices.
list2str

Combine list values as string.
diff_terms

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

Information on how to cite this package
get_fitted

Get model all fitted values.
pvisgam

Visualization of partial nonlinear interactions.
get_random

Get coefficients for the random intercepts and random slopes.
marginDensityPlot

Plot density of distribution in margins of the plot.
plot_modelfit

Visualization of the model fit for time series data.
errorBars

Add error bars to a plot.
acf_n_plots

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

Fade out the areas in a surface without data.
fill_area

Utility function
alphaPalette

Manipulate the transparency in a palette.
gamtabs

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

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

Add a gradient legend to a plot.
plot_parametric

Visualization of group estimates.
summary_data

Print a descriptive summary of a data frame.
addInterval

Draw intervals or arrows on plots.
convertNonAlphanumeric

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

Return the value (or the element with the value) closest to zero.
plot_diff2

Plot difference surface based on model predictions.
simdat

Simulated time series data.
plot_pca_surface

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

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

Add images to plots.