Hi Statalist.

I have a couple of variables that only appear in waves 4, 7, 10, 14, 18 (of a panel dataset of 18 waves). As such, these variables contain large numbers of missing values. I used the code (slightly amended from here)
Code:
replace dummy = L1.dummy if missing(dummy)
which fills in the gaps between waves 4 - 18. How can I amend this code to copy the response from wave 4 back to waves 1 to 3?

Help kindly appreciated.

Stata v.15.1