You are on page 1of 2

use "D:\Kerja\MI\Susenas\Susenas Maret 2022\konsumsi22_v3.

dta"
egen xgroup = xtile(group)
gen xgroup = xtile(group)
gen xgroup = xtile(group), nq(100)
tab group [fw=wert_n]
tab group [fw=weind_n]
tab group [iw=wert]
tab group [iw=weind]
tab group [pw=wert]
tab group [pw=wert_n]
tabstat ( group ), statistics (mean min max sum sd count) columns (statistics),
[pw=weind_n], format (%20.0f)
tabstat ( group ), statistics (mean min max sum sd count) columns (statistics),
[pw=weind], format (%20.0f)
help weight
table group [pw=weind], c(sum)
table group [pw=weind], c(freq)
table group [pw=weind], c(freq) format (%20.0f)
table group [pw=weind], c(mean expend min expend max expend sum expend sd expend
count expend), format (%20.0f)
table group [pw=weind], c(mean expend min expend max expend sum expend sd expend
count expend) format (%20.0f)
table group [pw=weind], c(mean expend min expend max expend sum expend) format
(%20.0f)
foreach i in mean min {
table group [pw=weind], c(`i' expend `i' food `i'nonfood) format (%20.0f)
}
foreach i in mean min {
table group [pw=weind], c(`i' expend `i' food `i' nonfood) format (%20.0f)
}
table group [pw=weind]
table group [pw=weind], format (%20.0f)
tab group [iw=weind]
tab group [iw=wert]
table group [pw=wert], format (%20.0f)
table group [pw=weind], row
table group [pw=weind], row format (%20.0f)
table group [pw=weind], coloumn format (%20.0f)
table group [pw=weind], column format (%20.0f)
table group [pw=weind], column format (%20.0f)
table group [pw=wert], column format (%20.0f)
table group [pw=weind], row format (%20.0f)
table group [pw=wert], row format (%20.0f)
tabstat ( expend food nonfood econs efoodcons enonfood), statistics (mean min max
sum sd count) columns (statistics), [fw=wert_n], format (%20.0f)
tabstat ( kapita foodpc nonfoodpc ), statistics (mean min max sum sd count) columns
(statistics), [fw=weind_n], format (%20.0f)
table kapita [pw=weind]
table kapita. c(mean) [pw=weind]
table kapita, c(mean) [pw=weind]
table kapita [pw=weind], c(mean)
help xtile
help xtile
help xtile
xtile percentile=kapita, [pw=weind] n(100)
xtile percentile=kapita, n(100)
bro percentile
tab percentile
table kapita [pw=weind], c(min max mean sum) format (%20.0f)
table kapita [pw=weind], c(min mean sum) format (%20.0f)
table kapita [pw=weind], c(mean) format (%20.0f)
table kapita [pw=weind], c(mean kapita) format (%20.0f)
sum percentile
count
sum percentile if percentile==40
sum kapita if percentile==40
sum kapita if percentile==80
gen kapitaw=kapita*weind
sum kapitaw if percentile==40
tab kapitaw if percentile==40 c(med)
table kapita [pw=weind]
table kapita [pw=weind], c(mean)
sum kapita [pw=weind]
tab kapita [pw=weind]
table kapita [pw=weind]
table kapita [pw=weind], c(mean kapita) format (%20.0f)
table [pw=weind], c(mean kapita) format (%20.0f)
table kapita [pw=weind], c(mean) format (%20.0f)
table kapita [pw=weind], format (%20.0f)
tabstat ( kapita foodpc nonfoodpc ), statistics (mean min max sum sd count) columns
(statistics), [aw=weind], format (%20.0f)
use "D:\Kerja\MI\Susenas\Susenas Maret 2022\konsumsi22_v3.dta"
table group [pw=weind], c(mean food mean nonfood) format (%20.0f)
table [pw=weind], c(mean food mean nonfood) format (%20.0f)
table group [pw=weind], c(mean food mean nonfood) row format (%20.0f)
tabstat ( kapita foodpc nonfoodpc ), statistics (mean min max sum sd count) columns
(statistics), [fw=weind_n], format (%20.0f)
tabstat ( kapita food nonfood ), statistics (mean min max sum sd count) columns
(statistics), [fw=weind_n], format (%20.0f)
table group [pw=wert], c(mean food mean nonfood) row format (%20.0f)
tabstat ( kapita food nonfood ), statistics (mean min max sum sd count) columns
(statistics), [fw=wert_n], format (%20.0f)
tabstat c_insfoodm c_rawfoodm c_cigarm c_durafoodm c_staplefoodm,[fw=wert_n]
tabstat c_insfoodm c_rawfoodm c_cigarm c_durafoodm c_staplefoodm [fw=wert_n]
table group [pw=wert] c(mean c_insfoodm mean c_rawfoodm mean c_cigarm mean
c_durafoodm mean c_staplefoodm) row format (%20.0f)
table group [pw=wert], c(mean c_insfoodm mean c_rawfoodm mean c_cigarm mean
c_durafoodm mean c_staplefoodm) row format (%20.0f)
table group [pw=wert], c(mean food mean nonfood) row format (%20.0f)
tabstat ( kapita food nonfood ), statistics (mean min max sum sd count) columns
(statistics), [fw=wert_n], format (%20.0f)
table group [pw=wert], c(freq) row format (%20.0f)
table group [pw=weind], c(freq) row format (%20.0f)
xtile percentile=kapita, n(100)
gen group2=2 if inrange(percentile,1,39)
replace group2=3 if inrange(percentile,40,80)
replace group2=4 if inrange(percentile,81,100)
replace group2=1 if miskin==1
table group [pw=wert], c(freq) row format (%20.0f)
table group [pw=weind], c(freq) row format (%20.0f)
sum percentile if percentile==99
sum expend if percentile==99
sum expend if percentile==99, format (%20.0f)
sum expend if percentile==99 format (%20.0f)
sum expend [pw=weind] if percentile==99 format (%20.0f)
sum expend [pw=weind] if percentile==99, format (%20.0f)
table expend [pw=weind] if percentile==99, format (%20.0f)

You might also like