emp_deriv | R Documentation |

`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).

```
emp_deriv(y, t, D, u, ztype = 0)
```

`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. ( |

A vector of the same length as the input variable "y" that contains empirical derivative estimates for each entry of "y".

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

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

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.