emp_deriv {HDCurves} | R Documentation |
Estimate of empirical derivative based on sequence of quotient differences.
Description
emp_deriv
Provides an estimate of an empirical derivative curve using one of the two sequence of quotient differences detailed in Page, Rodriguez-Alvarez, Lee (2020).
Usage
emp_deriv(y, t, D, u, ztype = 0)
Arguments
y |
numeric vector (response variable). |
t |
numeric vector (time variable). |
D |
integer indicating the bin width when estimating empirical derivatives |
u |
real indicating the bandwidth with regards to smoothing when estimating empirical derivatives. |
ztype |
integer indicating which sequence of empirical derivatives will be employed. ( |
Value
A vector of the same length as the input variable "y" that contains empirical derivative estimates for each entry of "y".
References
Page, G. L.; Rodriguez-Alvarez, M. X.; Lee, DJ; (2020) “Bayesian Hierarchical Modeling of Growth Curve Derivatives via Sequences of Quotient Differences” Journal of the Royal Statistical Society: Series C 69(2) 459-481
Examples
# Our R-package
library(HDCurves)
data(growth)
y <- growth$hgtm[,1]
t <- growth$age
fprime <- emp_deriv(y=y, t=t, D=10, u=1, ztype=0)
plot(t,y, type="b")
plot(t, fprime, type="b")