stata怎么利用outreg2命令将tab命令的频数图以表格形式导出到Excel表中变量为字符串格式tab var genfreq format120fsave tempdta replaceoutreg2 using outputxlsx excel replace这里面的format120f是确定的吗还是需要自己填
在使用outreg2命令时,format(%12.0f)是根据变量的数据类型来确定的。对于字符串变量,可以使用format(%12s)来指定格式。因此,对于字符串变量,可以使用以下命令:
tab var, gen(freq) format(%12s) save "temp.dta", replace
outreg2 using "output.xlsx", excel replace
原文地址: https://www.cveoy.top/t/topic/iuxN 著作权归作者所有。请勿转载和采集!