I am currently working on a monitoring and evaluation program where I need to create a report on the frequency of submission per partner per member and by month. I want this code to be persistent across differently named partners, members and dates so I can use it for similarly structured data in the future without specifying the names over again.
The data is structured like so
| Submission | member | member_organization | ...Other variables... | month |
| D-M-Y | Name | Organizationname | ... | 711 |
| ... | ... | ... | ... | ... |
| D-M-Y | Name2 | organization2 | ... | 712 |
| ... | ... | ... | .. | ... |
Something of the like of tables which are split up by organization and month
Organizationname month: 711
| member | Frequency |
| name | # |
| name3 | # |
| name4 | # |
| name5 | # |
Code:
levelsof member_organization, local(organization)
foreach partner in `organization' {
clear all
use "monitoring_and_evaluation.dta"
keep if member_organization == "`partner'"
levelsof month, local(months)
foreach mth in `months' {
tabout member_nameif month == `mth' using `mth'_`partner'.tex
}
}
}
Some of your variables consist entirely of missing values
==1 invalid name
Please does anyone have some insight as to what I can do? I might have a few followup questions as well because I am unfamiliar with the tabout feature
0 Response to Simple table export question: loop or by function?
Post a Comment