Hi statalist,
I'm working with a data set that resembles the following:
ID Income
1 50
1 40
1 20
2 10
2 40
2 50
3 60
3 20
3 10
I used collapse (mean) Income, by (ID)
now after collapsing the data is appearing in the following form
ID Income
2 Mean(2)
3 Mean(3)
1 Mean (1)
I need the output in the same order as before, i.e, in the form of
ID Income
1 Mean(1)
2 Mean(2)
3 Mean(3)
what should I do to obtain the means in the same order as the original data?
Thanks.
Related Posts with Collapse (mean) and data ordering
Gmm Estimator in panel data simultaneous EquationIn Stata software version 15 , if I want to check and see the result of individuals in GMM Estimator…
What is wrong with my bootstrap program, and why does it give the same estimates in every bootstrap sample?Lets say that I am trying to compare -reg3- estimates over two different subsamples, using bootstrap…
xtlogit vce(cluster cvar) returning no standard errorsHello everyone, I have a panel dataset. The dependent variable is information on whether an investm…
Gmm Estimator in panel data simultaneous EquationHello In Stata software version 15 , if I want to check and see the result of individuals in GMM Est…
Bootstrapped Maximum likelihood estimationDear Statalist users, I am trying to write a code in order to estimate a linear regression with boo…
Subscribe to:
Post Comments (Atom)
0 Response to Collapse (mean) and data ordering
Post a Comment