emp_deriv: Estimate of empirical derivative based on sequence of...

View source: R/Functions.R

emp_derivR 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. (0 indicates that which is parameterized by D and u while 1 indicates that which is parametrized by u)

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")


HDCurves documentation built on March 31, 2023, 10:08 p.m.

Related to emp_deriv in HDCurves...