Dear Statalisters,
after typing
qui forval i =1/10000 {
qui g double s`i' = Surv_Pos_IFI[`i']*(1-Monthly_Pr_Death_AML_MDS_Prob) in 1
replace s`i' = s`i'[_n-1]*(1-Monthly_Pr_Death_AML_MDS_Prob) if s`i'==.
qui g double u`i' = s`i'*LYS
}
I would like to obtain a variable where I can store the rowmeans for all the
u`i'.
I tried unsuccessfully to use egen v`i'=rowmean(u`i'), but this way I
(obviously, I would suppose) get v`i' for each u`i', and this not help the
achievement of my research purpose.
Thanks a lot for your kindness and for your time.
Kind Regards,
Carlo
*
* 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/