Please I am very new to Stata (using Stata 12) and will like to know the command to use to round off the decimals in avg_score to the nearest 0.5 (or to nearest whole number) affecting all values of the variable
Thanks
Thanks
| sn | names | score1 | score2 | total | avg_score | ||
| 1 | Mary | 7 | 7 | 14 | 7 | ||
| 2 | James | 5.5 | 4 | 9.5 | 4.75 | ||
| 3 | Edwin | 5.75 | 5.5 | 11.25 | 5.625 | ||
| 4 | Agnes | 6.5 | 5.5 | 12 | 6 | ||
| 5 | Ken | 6 | 4.5 | 10.5 | 5.25 | ||
| 6 | Smith | 6 | 5.5 | 11.5 | 5.75 | ||
| 7 | Willis | 6.25 | 4.5 | 10.75 | 5.375 | ||
| 8 | Andy | 6.5 | 3.5 | 10 | 5 | ||
| 9 | Job | 6 | 4 | 10 | 5 | ||
| 10 | Helen | 6.25 | 4 | 10.25 | 5.125 | ||
| 11 | Bob | 6.25 | 4.5 | 10.75 | 5.375 | ||
| 12 | Emma | 5.25 | 3 | 8.25 | 4.125 | ||
| 13 | Grace | 6.25 | 3.5 | 9.75 | 4.875 |

Comment