ar1_cor: Construct an AR(1) correlation matrix

View source: R/ar1_cor.R

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

FunSurv documentation built on April 3, 2025, 9:13 p.m.

Related to ar1_cor in FunSurv...