Page 1 of 1
Creating lag and differen variables
Posted: Mon Oct 13, 2025 7:17 am
by srk80
Hi,
Is there any function to create lag and first, second, ... difference variables in Jamovi?
Thanks.
Re: Creating lag and differen variables
Posted: Tue Oct 14, 2025 12:08 am
by jonathon
does the OFFSET() function do what you need?

- Screenshot 2025-10-14 at 11.07.35.png (388.79 KiB) Viewed 83 times
Re: Creating lag and differen variables
Posted: Tue Oct 14, 2025 4:18 am
by srk80
Yes. This is what I need. But Lag, Lead, diff are more used verbs in econometrics.
Lag -> OFFSET(A, 1)
Lead -> OFFSET(A, -1)
diff_1 -> A - OFFSET(A, 1)
diff_2 -> A - OFFSET(A, 2)
Re: Creating lag and differen variables
Posted: Tue Oct 14, 2025 4:21 am
by jonathon
great. so you're sorted then?
jonathon