Hello everyone,

My dataset contains:

- mcruns (50 Monte Carlo simulations)
- lgacode (50001 to 50136)
- species_code (1 to 5)
- abund (species abundance)
-year (1972 to 1981)

I need to generate a new dataset containing lgacodes species_code mean_abundance year1_lga

For each lgacode, species_code and year want to have the mean abundance instead of 50 (simulations). Sorry I am new to STATA and any help would be much appreciated.


Array