-
Notifications
You must be signed in to change notification settings - Fork 0
Home
ipacheckscto
is a Stata Module designed to check your SurveyCTO XLS form for common programming errors and best practices and outputs a list of issues and recommendations on the Stata result window with an option to export to an excel file. The SurveyCTO server and the desktop application already have built-in form validation tools that check XLS forms for syntax errors in forms. ipacheckscto
compliments these tools by running additional test for the following:
- common programming errors
- IPA recommended practices
ipacheckscto
should therefore be used only after the form validating the XLS form through the server or the desktop application.
NB: Not all issues flagged by
ipacheckscto
will require correction. Review the output carefully and decide if you need to make any changes to your form.
ipacheckscto
makes extensive use of Stata. Some parts of the program are also heavily dependent on Stata’s excel modules in order to create output files that are easy to use and disseminate. The excel modules are only available in Stata 14 or later and therefore requires that the user has Stata 14.0 or later installed on their machine prior to running ipacheckscto. IPA employees with older versions of Stata should contact IT for access to a newer version.
ipacheckscto is collated and distributed as a Stata package through github. You can install ipacheckscto directly from github by running the following line of code in your command line or by using a do-file:
net install ipacheckscto, all replace from("https://raw.githubusercontent.com/PovertyAction/ipacheckscto/master/ado")
ipacheckscto
package file includes the following files:
- ipacheckscto.ado – Stata program file
- ipacheckscto.sthlp – Stata helpfile
- ipacheckscto.dlg – Stata dialog file
help ipacheckscto
outfile(filename)
Specifies the output path and filename for exporting results into excel. The filename must include the extension .xls or .xlsx.
If
outfile()
is not specified, results will be displayed in the Stata result window only.
other(integer)
Specifies the integer value for other specify
option. If this option is specified, ipacheckscto will flag select_one/select_multiple fields which
- use
other specify
option in their choice list but are missing a childother specify
field; - have a child
other specify
field but appears after the childother specify
field; - use the or_other syntax. for instance
select_one fruits or_other
If
other()
option is not specified,ipacheckscto
will only check foror_other
syntax.
dontknow(integer)
Specifies the integer value for don't know
option. If specified, ipacheckscto
will flag;
- select_one/select_multiple fields which use choices list that does not include a
don't know
option; - integer/decimal/text fields that do not accept don't know values
If
dontknow()
option is not specified,ipacheckscto
will skip the don't know entirely.
refuse(integer)
Specifies the integer value for refuses to answer
option. If specified, ipacheckscto
will flag;
- select_one/select_multiple fields which use choices list that does not include a
refuses to answer
option; - integer/decimal/text fields that do not accept
refuses to answer
values
If
refuse()
option is not specified,ipacheckscto
will skip the refuse check entirely.
Check a SurveyCTO XLS form and display results on Stata window.
ipacheckscto using "C:\Users\Documents\Bontanga Baseline.xlsx“
Check a SurveyCTO XLS form and display results on Stata window. Include checks for other specify with the value of -666
ipacheckscto using "C:\Users\Documents\Bontanga Baseline.xlsx", other(-666)
Check a SurveyCTO XLS form and display results on Stata window. Include checks for other specify (-666), dontknow(-999) and refuse to answer (-888).
ipacheckscto using "C:\Users\Documents\Bontanga Baseline.xlsx", other(-666) dontknow(-999) refuse(-888)
Check a SurveyCTO XLS form and display results on Stata window. Include checks for other specify (-666), dontknow(-999) and refuse to answer (-888). Export results to excel file "C:\Users\Documents\output\botanga_baseline_check.xlsx"
ipacheckscto using "C:\Users\Documents\Bontanga Baseline.xlsx", other(-666) dontknow(-999) refuse(-888) outfile("C:\Users\Documents\output\botanga_baseline_check.xlsx")
Get the dialog box by typing db ipacheckscto
in the Stata command window: