Hi guys,
First time posting and still very new to the Stata so please bear with me. My problem will hopefully be very simple to resolve for those who are experienced with stata...
Example data:
trialno
bwh-0331-mat
bwh-0332-mat
bwh-0342-mat
bwh-0343-mat
bwh-0344-mat
bwh-0345-mat
bwh-0346-mat
bwh-0347-mat
I would like to replace all the observation values so that "mat" is replaced with "pat".
Instead of individually replacing the observations...there must be a clever way to do it with a couple of lines of command. Maybe using a loop of sort.
Help please?
First time posting and still very new to the Stata so please bear with me. My problem will hopefully be very simple to resolve for those who are experienced with stata...
Example data:
trialno
bwh-0331-mat
bwh-0332-mat
bwh-0342-mat
bwh-0343-mat
bwh-0344-mat
bwh-0345-mat
bwh-0346-mat
bwh-0347-mat
I would like to replace all the observation values so that "mat" is replaced with "pat".
Instead of individually replacing the observations...there must be a clever way to do it with a couple of lines of command. Maybe using a loop of sort.
Help please?

thanks a lot
Comment