Hello! I'm using Stata 13.1, and am running a basic frequency count for many variables, so am creating a loop. I'd also like to export to Excel and am using putexcel. My code (below) seemed to work with the exception I've encountered an error message related to my use of the operator Freq. Is there a different operator I should be using to describe frequency or number of observations that meet my criteria? (I haven't included an example from my dataset because I'm not sure that it's relevant but I certainly can if helpful.) Many thanks in advance!
local row = 1
foreach x in CG_challenge_work CG_challenge_findjob {
tab `x' if CG_child_zero_four==1
putexcel A`row'=("`x'") B`row'=(Freq.) using results.xlsx,
modify keepcellformat sheet ("results")
local row = `row' + 1
}
local row = 1
foreach x in CG_challenge_work CG_challenge_findjob {
tab `x' if CG_child_zero_four==1
putexcel A`row'=("`x'") B`row'=(Freq.) using results.xlsx,
modify keepcellformat sheet ("results")
local row = `row' + 1
}
Comment