-------------------------------------------------------------------------------
help for semean
-------------------------------------------------------------------------------

Calculate standard error of mean, optionally applying function

semean varname [if exp] [in range] [, noprint function(string) ]

varname may contain time-series operators; see help varlist.

semean calculates the standard error of the mean of a variable. Optionally, a function of the variable may be applied prior to computation of the variable's statistics.

This command was written as an illustration of ado-file development for Baum (2006). An egen function to compute the standard error of the mean is available in Nicholas Cox's egenmore package.

Options function(string) may be given in order to calculate statistics based on that transformation of the variable. Any valid Stata numeric function may be provided.

noprint specifies that no output is to be produced. With or without this option, the mean, standard error of mean and number of valid observations are placed in the return vector.

Examples

. webuse lutkepohl,clear

. semean investment

. semean linvestment

. semean investment, func(log)

Author

Christopher F. Baum, Boston College, USA baum@bc.edu

References

Christopher F Baum, 2006. An Introduction to Modern Econometrics with Stata. College Station:Stata Press.

Also see

On-line: egenmore (if installed)