Hi STATALIST,

Could you please help me to replace meacstdivol_1 with last row within each study_1?



Code:
 
study_1 meanctdivol_1
8363
8363
8363 12.6
8363
8363
8363 12.3
8363
8363
8363 12.5
8363 12.4
10642
10642
10642 45.8
10642 45.8
so results should be like:
Code:
 
study_1 meanctdivol_1 ctdi
8363 12.4
8363 12.4
8363 12.6 12.4
8363 12.4
8363 12.4
8363 12.3 12.4
8363 12.4
8363 12.4
8363 12.5 12.4
8363 12.4 12.4
10642 45.8
10642 45.8
10642 45.8 45.8
10642 45.8 45.8


Kind regards,