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 |
David Kantor <kantor.d@att.net> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Going through each observation of a variable |

Date |
Fri, 07 Jun 2013 13:38:04 -0400 |

Hello Derya At 12:47 PM 6/7/2013, you wrote:

David, thanks a lot for your answer. You are right that my questionwas not clear. The data set has about 80,000 individuals, it is justthese particular variables that represent the price scenarios have500 observations. I would like to go through each of the 500 pricesone by one, and evaluate the expression for each individual, andcreate a new variable for each replication (Y_`k' where k=1,..,500).Each Y_`k' will have 80,000 observations. Then I would like tosummarize horizontally across replications, not across individuals.At the end, each individual will have the mean and standarddeviation of the 500 different price effects. Mean (wmean) andstandard deviation (wsd) will also be variables with 80,000 observations.The code below tried to followhttp://www.stata.com/statalist/archive/2002-06/msg00112.html. Butactually I don't want to randomly select from 500, I want theprogram to go through each observation one by one, create a newvariable for each replication, and take a horizontal mean and sdacross replications.I hope this is something feasible to do... Derya [..]

If so, how are they named? Or are they in long shape?

Let us know, and then we will have more to work with to help you. --David * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/faqs/resources/statalist-faq/ * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**Re: st: Going through each observation of a variable***From:*Derya Karaci <dkaraci@yahoo.com>

**References**:**st: Going through each observation of a variable***From:*Derya Karaci <dkaraci@yahoo.com>

**Re: st: Going through each observation of a variable***From:*David Kantor <kantor.d@att.net>

**Re: st: Going through each observation of a variable***From:*Derya Karaci <dkaraci@yahoo.com>

- Prev by Date:
**Re: st: Fw: R, STATA clogit** - Next by Date:
**st: On the use of the stata() funtion of Mata** - Previous by thread:
**Re: st: Going through each observation of a variable** - Next by thread:
**Re: st: Going through each observation of a variable** - Index(es):