dpffr_gam: DPFFR using gam

Description Usage Arguments Details Value References

View source: R/dpffr_gam.R

Description

DPFFR considers a functional response Y[i,(t*+1):length(month)] for each subject i. The predictor, Y[i,1:t*], is also functional, which makes the approach a dynamic function-on-function regression. We provide the implementation of DPFFR with the pffr function from the refund R package and the gam function from the mgcv R package.

Usage

1
dpffr_gam(data = HAZ, time = 0:15, hist.lngth = 7)

Arguments

data

A matrix of values with each row representing an individual and each column representing measurements at each time point (e.g. column 1 is time point 1, etc.). Measurements are assumed to be taken at the same time intervals for every participant.

time

A vector of times. This equal the number of columts in the matrix provided (e.g. 0 through 15 months for the example dataset).

hist.lngth

The length of known history for the observed process. We use leave one-curve out cross validation for prediction (hist.lgth is 7 for the example dataset).

Details

Using gam from the mgcv R package is an option for DPFFR. When using gam for DPFFR there is a required step of having the functional response Y[i,(t*+1):length(month)] in vector format. Additional steps are needed to generate the required data format for gam. Details are shown below.

Value

A matrix of predictions with rows representing each individual and columts representing predictions for each time point.

References

Ivanescu AE, Crainiceanu CM, Checkley W. Dynamic child growth prediction: A comparative methods approach. Statistical Modelling. 2017 Dec;17(6):468-93.


MatthewGrigsby/growthmetrics documentation built on May 25, 2019, 8:29 p.m.