Hi Everyone,
I have a dataset looking like this:
Date id var1 var2 var3 var4...
2010 1 ... ... ... ...
2010 1 ... ... ... ...
2010 1 ... ... ... ...
2010 2 ... ... ... ...
2010 2 ... ... ... ...
2010 2 ... ... ... ...
2010 3 ... ... ... ...
2010 3 ... ... ... ...
2010 3 ... ... ... ...
I'd like to find mean of each variable by id. That is, at the end, I want to achieve something like this:
Date id mean_var1 mean_var2 mean_var3 mean_var4...
2010 1 ... ... ... ...
2010 2 ... ... ... ...
2010 3 ... ... ... ...
It would be great if you can help. Thank you in advance.
Best,
Related Posts with Taking Average by id
Within Estimator StataI have a set of panel data showing Unemployment in NI & ROI pre brexit in 2015 and post brexit i…
Changing Axis Range - Pre Saved .gphHi Im having an issue with a pre saved graph. I would like to change the range of mye y-axis. Someon…
Cumulative frequency of unique values within groupsHello statalist, My dataset is an unbalanced time series (with repeated years). Each company can ha…
How to find the matched observation with nearest Mahalanobis distance?Hi everyone, I am wondering how to find the matched observation with nearest Mahalanobis distance. …
Cox-Model with very few observationsHello everybody, I am researching peace agreements and their durability if they include gender prov…
Subscribe to:
Post Comments (Atom)
0 Response to Taking Average by id
Post a Comment