Hello !
so i hvae trying this code i found in a tutorial to create a table similar to the one joind here and i get : 'Invalid type of entry in cells option, or you may
have forgotten to turn on the sum or svy option'
i dont know where should i turn on these options or whether the code doesnt actualy work for this goal
the code :
************************************************** ***************************************
use "data path", clear
generate dummy = 1
tokenize "classize c_size tipuach "
local counter = 0
local filemethod = "replace"
local heading = "h1(nil) h2(nil) h3(|Mean |SD | p10 | p25 | p50| p75 )"
foreach v of varlist classize c_size tipuach {
if `counter' > 0 {
local filemethod = "append"
local heading = "h1(nil) h2(nil) h3(nil)"
}
label define dummy 1 "`1'", modify
label val dummy dummy
tabout dummy using example.txt, ///
`filemethod' c(mean `v' SD `v' ///f(1c 1c 1c 1c 1c 0) sum `heading' ///
lines(none) ptotal(none)
mac shift
local counter = `counter' + 1
}
************************************************** ***************************************
the kind of table im trying to get : ( please do share if you have a better code for this type pf tables, thank you)
Array
0 Response to Descriptive stats
Post a Comment