ar1_cor {FunSurv} | R Documentation |
Construct an AR(1) correlation matrix
Description
Construct an AR(1) correlation matrix
Usage
ar1_cor(n, rho)
Arguments
n |
number of events for each subject |
rho |
autoregressive correlation |
Value
A n by n matrix
Examples
## Generate AR(1) structure
ar1_cor(n = 5, rho = 0.3)
## first derivative of the AR(1) structure with respect to rho
dar1_cor.drho(n = 5, rho = 0.3)
[Package FunSurv version 1.0.0 Index]