1. If you were having a problem with your "ci mean varname" command in your .do file change your version 14 to version 14.1 at the top of your .do file. This should solve it.
They must have added the "ci mean" command in version 14.1 so it will not work in version 14