====== Problem Solutions for Data Retrieval ====== Normally the [[:en:results:download|data download]] works fine -- if not, this chapter provides solutions. ===== No cases in data set ===== You have [[:en:results:download|downloaded]] and opened the data, but only see the header (CSV) or only the variables (SPSS or R) without any cases in the data set? ==== Filter Criteria ==== Please check the settings under **Collected Data** -> **Filter Criteria for Valid Cases**. For example, SoSci Survey automatically switches off "Pretest" and "Survey development" under //Interview context (MODE)// after the start of the survey administration period. If you want to retrieve test data, activate these two options again. Also check the setting //Interview progress//. Select "All records" to retrieve even those cases in which the FINISHED variable has the value 0 ([[:en:results:variables]]). {{:de:results:scr.datafilter.png?nolink|Setting for the selection of valid cases}} After saving ({{:button.save.png?nolink|Save Settings}}), check the //Summary// at the bottom on how many cases match the filter. ==== Visual Inspection ==== Open **Collected Data** -> **View Data Set**. On the upper left at //Questionnaire// selec the option "[All]". Now, you will see all the records collected in your survey project. {{:de:results:scr.data.view-filter.png?nolink|View Data Set}} Pay attention to the color of the case number (CASE) on the left. Blue cases are retrieved by **Download Data**, grey cases do not match the filter currently set in **Collected data** -> **Selection criteria for valid cases** (see above). ===== There are Answers Missing in the Data Set ===== ==== No Data (Empty Cells) ==== If no data is available for some or several variables in a record (case), first check under **Collected data** -> **View data** whether no data is actually available there. If the answers are available online but not in the downloaded data set, something went wrong during the import. If no data is shown under **View data** either, next check which color the cell is highlighted with. If this is red or green, it can only be a text input query or an internal variable. If the table cell under **View data** is white, then the question or item has not been asked (strictly speaking, the respondent has not sent the page with the answers by clicking "Next"). * This can be seen from the fact that the LASTPAGE and MAXPAGE variables contain a smaller page number than the last page in the questionnaire. * Please note that the order of the variables in the data set is often different from the order of the questions in the questionnaire. It is therefore quite possible that variables "left" in the data set (but placed on a later page in the questionnaire) are missing and variables on the "right" (whose questions were placed earlier in the questionnaire) contain data again. * It is also possible that the question or item was skipped or hidden by a filter. This can be easily checked using the print view (printer symbol in the CASE column under **View data**). * Use the "TIME" variables to check which pages of the questionnaire were actually displayed. * Also check the "MODE" variable in the case in question. If it says "pretest" or "debug", the interview was not completed regularly, but was started e.g. with the "Play" button under **Compose Questionnaire**. And not necessarily from the first page of the questionnaire. * If several questionnaires were defined under **Compose Questionnaire** -> **Manage Questionnaires**, then it is possible that a different questionnaire was completed in the interview. To check this possibility, check the variable "QUESTNNR". * If a question was not placed under **Compose Questionnaire** or integrated using PHP code, it did not appear in the questionnaire and no data was collected at all. Whether a question was removed from the questionnaire during the survey under **Compose Questionnaire** or was missing from the outset can be traced under **Compose Questionnaire** in the "Internal code" tab using the "History". * ==== Error Codes for Obligatory Questions ==== If a question has been defined as a mandatory question ("must be answered"), the code ''-9'' "no answer" can still appear in the record for this question. Under the following conditions: * Under **Compose Questionnaire** in the "Settings" tab, check whether the function "Option for the participant to view the questionnaire without answering mandatory questions" has been enabled. If yes, respondents can "view only" the questionnaire. * Use the LASTPAGE variable to check whether the case may be a dropout. If a person does not answer a mandatory question, the questionnaire page is displayed again -- but the "no answer" (''-9'') is already stored in the data set. The variable LASTPAGE is set to the page number of the submitted page, i.e., the page with the mandatory question. If the person then closes the browser window, the ''-9'' remains saved in the data record. ==== Missing variables ==== If variables are missing in the data set, please check first * Whether the questions under **Compile questionnaire** have been placed on a page in the questionnaire and * whether there are any other questionnaires in the survey project under **Compile questionnaire** -> **Manage questionnaires**. If so, use the variable ''QUESTNNR'' in the data set to check which questionnaire was used. Next, please use the variables ''LASTPAGE'' and ''%%TIME***%%'' to check whether the page of the question in question was even displayed in the interview. In the next step, please start the questionnaire from the first page in debug mode ([[:en:create:debugging]]) and follow the debug information (top right), * Whether pages and/or questions are skipped by filters and * if the questions concerned appear in the questionnaire, which identifier they have and after clicking on "Next", * under which variables the answers are written to the data set. Please note that the question types [[:en:create:questions:contact]] and [[:en:create:questions:email]] do not save any answers in the data set. Another possible source of error is that questions or items were deleted after the survey. The data can then no longer be assigned to a variable, even if new questions are created with the same identifier. In this case, the data can be downloaded if the option //All existing data including data from deleted questions/items// is selected under //Select variables// in the **Download data** tab of the **Variables** tab. However, you must then reconstruct the variable names using the sequence and the data they contain. ===== Shifted columns in CSV ===== If you encounter problems opening the CSV file in Microsoft Excel, please read [[:en:results:import-excel#problems_while_importing|Data Import in Microsoft Excel: Problems while Importing]]. ===== Truncated Texts in Excel ====== If an open-ended text entry starts with a minus sign (''-'') -- often used by respondents as indents of an enumeration -- then Excel may cut off the text after 255 characters ([[https://superuser.com/a/776614/141023|contribution in superuser]]). Microsoft has not yet provided a bugfix for this bug. One possible solution is to open Excel first. Then select **File** -> **Open** from the menu and explicitly define the affected column as //Text// in the import wizard (be careful to select the correct encoding for umlauts and the text recognition character!). However, multiple-line text entries may not be recognized correctly. It is easier to open the CSV file first with OpenOffice, then save it as an XML file and then (if desired) open it in Excel. ===== Shifted columns in SPSS ===== If, when importing the data into SPSS, everything looks good at first, but then suddenly data is found in an incorrect variable, this may be because (a) you are using a very old version of SPSS or (b) one of your participants has given a very long response. Under **Collected Data** -> **View Data Set**, please check first that the problem really is caused by importing data into SPSS. Then please use the [[:en:results:import-spss-csv|SPSS-Import via CSV]]. ===== Missing decimal numbers in SPSS ===== Depending on the language version, SPSS (like other software) expects either a comma (German) or a dot (English, etc.) as decimal separator for decimal numbers. If the data was imported correctly into SPSS by and large, but decimal numbers are missing, check whether the setting for downloading the data matches the language version of your SPSS: **Collected Data** -> **Download Data** -> //SPSS// -> Decimal separator. {{:de:results:scr.data.spss.decimal.png?nolink|Setting the decimal mark when downloading the data}} If you are importing CSV files (e.g. in Excel or Stata), you can also find this setting for CSV files in the //CSV// tab. ===== Strange Characters in SPSS Variable Names ===== If you use non-Western European characters for your variables (Russian, Korean, Chinese, etc.) SPSS may not open the syntax file for import correctly. Instead of the correct variable labels and value labels, there will then be a jumble of characters. - First make sure that Unicode is enabled in SPSS: SPSS Menu -> **Edit** -> **Options** -> Tab //Language// -> //Character encoding for data and syntax// -> select the "Unicode" option here. - Do not open the SPS file (syntax) by double-clicking in the browser or Explorer, but in SPSS via the menu **File** -> **Open** -> **Syntax**. Select the SPS file here and select the "Unicode (UTF-8)" option as //Coding//. Then click on //Open//. {{:de:results:scr.troubleshooting.spss.utf8.png?nolink|SPSS: Open Syntax}}