* 잘 정리된 사이트
https://dreamingpeace.tistory.com/44
[STATA] 정말 유용한 egen row: mean, sum, total, max, min, tag, group, concat, cut
egen command를 통해 활용할 수 있는 함수들을 몇 가지 알아보겠습니다. mean() egen mean_price = mean(price), by(store_id) 이는 각각의 store_id에 대하여 price의 평균값을 mean_price라는 새로운 변수로 저..
dreamingpeace.tistory.com
여기서는 아래의 블로그를 참조했다고 함
https://stataprogect. blogspot.com/2007/12/step4-thank-god-for-egen_command.html
egen mean_price = mean(price) , by(group)
* 주의할 점 : 관측치에 결측값이 있을 경우에는 mean을 구하지 못한다
egen nfem=total(gender==1), by(family)
'STATA' 카테고리의 다른 글
table to excel or docx (0) | 2022.08.04 |
---|---|
outreg 사용법 관련 (0) | 2022.07.19 |
데이터 집계하기 (0) | 2021.10.11 |
표준화하기_횡단면과 패널데이터 (0) | 2021.09.27 |
분위수 생성방법 (0) | 2021.09.22 |