I am facing a problem that seems simple, but I cannot figure it out to solve. Let us say I have the following data:
input id date Ri
1 1 .3
1 2 .4
1 3 .6
1 4 .7
end
what I want is to multiply -1 with secon Ri , fourth Ri, sixth Ri and so. So, for the above data, I should get the data in following result
input id date Ri
1 1 .3
1 2 -.4
1 3 .6
1 4 -.7
end
input id date Ri
1 1 .3
1 2 .4
1 3 .6
1 4 .7
end
what I want is to multiply -1 with secon Ri , fourth Ri, sixth Ri and so. So, for the above data, I should get the data in following result
input id date Ri
1 1 .3
1 2 -.4
1 3 .6
1 4 -.7
end
Comment