Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Pedro Nakashima <nakashimapedrolist@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
st: Accumulated mean and standard deviation |

Date |
Sun, 8 Jan 2012 13:50:07 -0200 |

Hi everybody I need to replicate the following data: clear* input x mean sd 2 2 . 4 3 1.4142 1 2.33 1.5275 3 2.55 1.2909 end The variables mean and sd are like a mix of sum() and egen functions. For the variable "mean", in each observation j, its entry is the mean of the values of the variable "x" from observation 1 up to observation j. For example: 2 is the mean of 2 3 is the mean of 4 and 2 2.33 is the mean of 1, 4 and 2 2.55 is the mean of 3, 1, 4 and 2 The same is true for the variable sd, but here we consider the standard deviation. Does anyone know how to solve this problem? Many thanks, Pedro Nakashima. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Accumulated mean and standard deviation***From:*Sunil Kumar <stuff.sunil@googlemail.com>

**Re: st: Accumulated mean and standard deviation***From:*Matthew White <mwhite@poverty-action.org>

- Prev by Date:
**Re: st: What should I do if stata can not show the result of nbreg** - Next by Date:
**Re: st: Accumulated mean and standard deviation** - Previous by thread:
**[no subject]** - Next by thread:
**Re: st: Accumulated mean and standard deviation** - Index(es):