Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for a continuous time AR(1) analogue to cor_ar() #741

Open
gavinsimpson opened this issue Aug 29, 2019 · 6 comments
Open

Add support for a continuous time AR(1) analogue to cor_ar() #741

gavinsimpson opened this issue Aug 29, 2019 · 6 comments

Comments

@gavinsimpson
Copy link

gavinsimpson commented Aug 29, 2019

The discrete time AR(1) correlation structure can be generalised to the continuous time setting.

A continuous time AR(1) or CAR(1) correlation structure can be defined as

h(s, ϕ) = ϕs, s ≥ 0, ϕ ≥ 0

where s is a non-negative real. In contrast to the AR(1), the correlation parameter ϕ is constrained to be non-negative. The CAR(1) correlation function is a univariate special case of the exponential spatial correlation function.

The nlme package has an implementation of this correlation function in its nlme::corCAR1().

A cor_car1() function in brms mirroring cor_ar() but for the CAR(1) correlation would be very useful for modelling longitudinal data for example in settings where the observations are not regularly spaced in time.

There is a small amount of discussion of this on the Stan Discourse site.

@paul-buerkner
Copy link
Owner

Thanks for opening this issue! Can we think of another name as cor_car1 though as it is too close to the cor_car function for (spatial) conditionally autoregessive models and thus will confuse users.

@gavinsimpson
Copy link
Author

Would cor_ctar1() be sufficiently different or do we need to think further from the box?

@paul-buerkner
Copy link
Owner

Sounds reasonable. Perhaps we should go for cor_ctar and make the 1 an argument in case we ever want to go beyond processes of order 1.

@gavinsimpson
Copy link
Author

cor_ctar() sounds good to me. 👍

@GitTFJ
Copy link

GitTFJ commented Jun 14, 2021

Has the cor_ctar function been added yet? I cant seem to find any other (except this one) reference to it. If not, are there any plans to add this continuous temporal term?

@paul-buerkner
Copy link
Owner

It has not been added yet unfortunately. There are plans as per this issue but no specific timeline.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants