Skip to content
iabaako edited this page Apr 26, 2021 · 19 revisions

Overview

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.

Software Requirements

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.

Installation

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

Syntax

help ipacheckscto

using options

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 child other specify field;
  • have a child other specify field but appears after the child other specify field;
  • use the or_other syntax. for instance select_one fruits or_other

If other() option is not specified, ipacheckscto will only check for or_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.

Example

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")

Dialog box

Get the dialog box by typing db ipacheckscto in the Stata command window:

examples



Clone this wiki locally