Learn R Programming

irregulAR1 (version 1.0.0)

dprec_drho: Derivative of the precision matrix for a stationary Gaussian AR(1) process.

Description

Creates the derivate of the precision matrix of an AR(1) process with respect to the parameter rho. The process has been observed at the time points in the vector times and is assumed to be in stationarity, and to have Gaussian errors.

Usage

dprec_drho(times, rho, sigma)

Arguments

times

An vector of positive integers, preferably ordered.

rho

A real number strictly less than 1 in absolute value.

sigma

A positive real number.

Value

A sparse square matrix with length(times) rows.

Examples

Run this code
# NOT RUN {
library(Matrix)
times <- c(1, 4:5, 7)
rho <- 0.5
sigma <- 1
dprec_drho(times, rho, sigma)
# }

Run the code above in your browser using DataLab