1
我試圖標記一批使用循環如下變量標籤的變量,但未能與STATA錯誤「無效語法」。我找不到哪裏出了問題。塔塔:使用forvalue循環
local myvars "basicenumerator" "basicfr_gpslatitude" "basicfr_gpslongitude"
local mylabels "Name of enumerator" "the latitude of the farmers house" "the longtitude of the farmers house"
local n : word count `mylabels'
forvalues i = 1/`n'{
local a: word `i' of `mylabels'
local b: word `i' of `myvars'
label var `b' "`a'"
}
它的工作!感謝您的及時迴應! –