When the data is a mess - for example, multiple response questions split apart and numbers that do not make sense - the problem is always that the data file that is being used contains one or more problems. Most commonly, the problem will be either that:
- A data file is used that contains no metadata (e.g., the file will contain a value of 1 to indicate 'male', but nothing in the file indicates that 1 means 'male'). CSV files never contain metadata and, for this reason, are generally not recommended.
- The metadata that is contained in the file is incorrect. In particular, SPSS data files are often created incorrectly.
Files with no metadata
If the data file contains no metadata, the solution is to either:
- Obtain a data file with metadata (see File Formats Supported by Q).
- Manually enter the metadata (see Excel and CSV Data File Specifications for recommendations on how to set up Excel and CSV files and Using Excel and CSV Files in Q for an overview).
Files with incorrect metadata
If the file contains incorrect metadata, the solutions are to:
- Contact whoever provided the data file and provide them with specifications for creating a good data file. See File Formats Supported by Q for overviews and specific links to more detail on the appropriate setup of data files.
- Prepare a QScript to automatically fix the file. This approach is generally only a good idea when the poor data file has been generated automatically by a data collection program that is known to have a faulty routine for automatically creating data files (where the faulty data file is due to human error, automating via a script is usually impractical as the human errors will be inconsistent). If you are using a proprietary data collection program then support will create a QScript for a fee. If you are using a commercial data collection platform that is in widespread use then support may create a QScript for no fee.
- Fix it yourself (see Setting Up Your Data in Q).
Tips for getting an Excel or CSV file working well in Q
How to Update CSV and Excel Files
How to Set Up Files With No Metadata
Article is closed for comments.