makemethod_train_smooth_data {gcplyr}R Documentation

Create method argument for caret::train of growth curve smoothers

Description

This function generates a list which is compatible to be used as the method argument to caret::train. This enables users to call caret::train directly themselves with smooth_data smoothing functions.

Usage

makemethod_train_smooth_data(sm_method, tuneGrid = NULL)

Arguments

sm_method

Argument specifying which smoothing method should be used. Options include "moving-average", "moving-median", "loess", "gam", and "smooth.spline".

tuneGrid

A data frame with possible tuning value. The columns should be named the same as the tuning parameters.

Note that, when using caret::train, the tuneGrid must be passed both to this function as well as directly to caret::train.

Value

A list that can be used as the method argument to caret::train. Contains elements: library, type, prob, fit, parameters, grid, fit, and predict.

See documentation on using a custom model model in caret::train for more details.


[Package gcplyr version 1.9.0 Index]