Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getdx

A wrapper function to call functions in the fda package to obtain smoothed estimated derivatives at a specified order


Description

A wrapper function to call functions in the fda package to obtain smoothed estimated derivatives at a specified order

Usage

getdx(theTimes, norder, roughPenaltyMax, lambda, dataMatrix, derivOrder)

Arguments

theTimes

The time points at which derivative estimation are requested

norder

Order of Bsplines - usually 2 higher than roughPenaltyMax

roughPenaltyMax

Penalization order. Usually set to 2 higher than the highest-order derivatives desired

lambda

A positive smoothing parameter: larger –> more smoothing

dataMatrix

Data of size total number of time points x total number of subjects

derivOrder

The order of the desired derivative estimates

Value

A list containing: 1. out (a matrix containing the derivative estimates at the specified order that matches the dimension of dataMatrix); 2. basisCoef (estimated basis coefficients); 3. basis2 (basis functions)

References

Chow, S-M. (2019). Practical Tools and Guidelines for Exploring and Fitting Linear and Nonlinear Dynamical Systems Models. Multivariate Behavioral Research. https://www.nihms.nih.gov/pmc/articlerender.fcgi?artid=1520409

Chow, S-M., *Bendezu, J. J., Cole, P. M., & Ram, N. (2016). A Comparison of Two- Stage Approaches for Fitting Nonlinear Ordinary Differential Equation (ODE) Models with Mixed Effects. Multivariate Behavioral Research, 51, 154-184. Doi: 10.1080/00273171.2015.1123138.

Examples

#x = getdx(theTimes,norder,roughPenaltyMax,sp,out2,0)[[1]] #Smoothed level
#dx = getdx(theTimes,norder,roughPenaltyMax,sp,out2,1)[[1]] #Smoothed 1st derivs
#d2x = getdx(theTimes,norder,roughPenaltyMax,sp,out2,2)[[1]] #Smoothed 2nd derivs

dynr

Dynamic Models with Regime-Switching

v0.1.16-2
GPL-3
Authors
Lu Ou [aut], Michael D. Hunter [aut, cre] (<https://orcid.org/0000-0002-3651-6709>), Sy-Miin Chow [aut] (<https://orcid.org/0000-0003-1938-027X>), Linying Ji [aut], Meng Chen [aut], Hui-Ju Hung [aut], Jungmin Lee [aut], Yanling Li [aut], Jonathan Park [aut], Massachusetts Institute of Technology [cph], S. G. Johnson [cph], Benoit Scherrer [cph], Dieter Kraft [cph]
Initial release
2021-03-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.