Actions

回答の出力

From LimeSurvey Manual

Revision as of 02:04, 19 February 2019 by Bravehorse (talk | contribs) (Created page with "{{Note|スプレッドシートの最初の2行は列ラベルです。最初の行は、質問の名前を詳述する"人間が判読可能な"列見出しです。2番目...")


アンケートをアクティブにしたあとは、回答の閲覧、分析用にエクスポートすることができるようになります。エクスポート機能にアクセスするには、(アンケート関連パネルに表示される)回答をクリックし、次にドロップダウンメニューから回答と統計をクリックします。



回答概要ページが読み込まれます。ここで、一番上のツールバーにある エクスポートオプションを探します。



いくつかのオプションがあります。


回答の出力

次のパネルは、ドロップダウンメニューから最初のエクスポート関連オプションが選択されたときに表示されます。



フィルタオプションは次のように分かれています。

  • 出力形式: 結果を出力する形式を選択します。以下の出力形式が利用可能です。
    • CSVファイル(すべての文字セット): フォーマットタブの下段にある"CSVフィールド区切り"オプションと合わせて設定してください。既定は"コンマ"です。そのほか、"セミコロン"、"タブ"があります。
    • HTML
    • R(データファイル): このオプションを選択する場合は、R(シンタックスファイル)も併せて出力してください。Rでデータを分析する方法の詳細については、こちらのウィキセクションを参照してください。
    • Microsoft Word(ラテン文字セット)
    • Microsoft Excel(すべての文字セット)
    • STATA(.xml): STATAでデータを分析する方法の詳細については、こちらのウィキセクションを参照してください。
    • PDF
    • R(シンタックスファイル): このオプションを選択する場合は、R(データファイル)も併せて出力してください。Rでデータを分析する方法の詳細については、こちらのウィキセクションを参照してください。
  • 全般
    • 完了状態: 全ての回答、完了された回答のみ、未完了回答のみから選択します。それぞれの意味については、こちらのウィキセクションを参照してください。
    • 言語エクスポート: 既定のオプションはアンケートのベース言語です。
  • 範囲: 回答テーブルに保存されている回答IDを指定します。回答を出力する際、入力した値に問題がある場合(範囲内のIDがないなど)、テーブルに存在するIDを入力するようポップアップが表示されます。


範囲は、単一の回答回答のグループを出力する場合は表示されません。


  • 回答
    • 回答を出力: 回答をそのまま出力するか回答コードに変換して出力することができます。後者を選択すると、回答者が送信した回答は、それぞれの回答コードに置き換えられます。"はい"と"いいえ"の回答は、どのような表現であっても"Y"、"N"に変換されます。 "Y/Nを次の文字に変換"を使用すると、Y/Nで表現される回答コードは、対応するボックスに入力された文字列に変換されます。既定では、Yは1、Nは2となっています。


全回答と回答コードの違いについては、こちらのウィキセクションを参照してください。


  • 見出し
    • 質問を出力: 出力ファイルの見出しを設定します。以下のオプションで選択します。
      • 質問コード
      • 簡略化された質問のテキスト: このオプションを選択すると質問の長さが短くなります。長い質問を扱うときに役に立ちます。
      • 質問テキスト全文(既定)
      • 質問コードと質問テキスト
    • ストリップHTMLコード: 質問のテキストボックスで使用されているHTMLを出力しないよう、既定ではオンになっています。
    • 質問テキストのスペースを下線に変換します: 既定ではオフになっています。オンにすると質問テキストのスペースが下線に変換されます。
    • 短縮テキスト: 既定ではオフになっています。オンにすると、質問テキストが短縮されます。質問テキストの長さは、"文字数"に入力した数値で指定します。見出しとして"質問テキスト全文"や"質問コードと質問テキスト"を選択したときに出力される質問テキストを短縮することができます。
    • EMコードを使用: 既定ではオフになっています。オンにすると、質問とサブ質問がExpressionScriptで使用したもので出力されます。したがって、見出しは、Qcode変数の命名に従います。本設定を使用するには、見出しとして"質問コード"か"質問コードと質問テキスト"を選択する必要があります。
    • 文字数 見出しに表示される最大文字数を設定します。このオプションは、質問として短縮テキストを出力するときに機能します。既定値は15です。
    • コード/テキスト区切り: 質問のコードとテキストを区切る文字を指定します。既定では、"ピリオド"+空白文字(<SPACE>)です。
  • カラム選択: 出力する質問(と対応する回答)を選択します。質問コードと質問テキストがリストに表示されます。既定では、すべてのカラムが出力されます。複数のカラムを選択するには、CTRLやSHIFTキーを使用します。
  • トークンの制御 - 出力するアンケート参加者を選択します。このオプションは、アンケートが匿名でない場合にのみ有効です。アンケート参加者テーブルの説明、使い方について詳しくはこちらを参照してください。



R形式での出力

フリーソフトウェア環境のRは、統計計算とグラフィックスに使用されるSPSSの代替手段です。

データセットをRにインポートするには、以下の手順に従ってください。

  1. シンタックスファイルとデータファイルの両方をダウンロードします。
  2. 両方のファイルをRの作業ディレクトリーに保存します(作業ディレクトリーを取得・設定するには、Rのコマンドウィンドウでgetwd()setwd()を使用します)。
  3. Rコマンドウィンドウでsource("File_name_syntax.R")と入力します。"data"というデータフレームに正しい形式でインポートします。


わかりやすいGUIでRでデータを操作するには、RStudio(無料のオープンソースソリューション)を使用することもできます。上記のガイドラインに従うと、データは次のようになります。



選択肢が限定された質問の回答は、質問のコードと一致するラベルと選択肢と一致するラベルに分解されます。

"その他"のオプションが追加された質問では、「その他」データ用の新しい列として「_Other」という質問フィールドが追加されます。

R-exportはLimeSurveyのプラグインです。If you cannot find the 出力形式にR-exportのオプション(R(シンタックスファイル)、R(データファイル))が見当たらない場合は、プラグインメニューでR-exportが利用可能になっているか確認してください。



STATA-xmlでの出力

STATAは、商用のデータ分析・統計ソフトウェアパッケージです。

このエクスポート機能は、LimeSurveyで収集されたデータの迅速な分析を容易にするために作成されました。STATA独自のフォーマットでXMLファイルを作成します。この形式は、普通のCSVファイルインポートに比べ、いくつか利点があります。

  • 変数ラベル(質問、サブ質問)および値ラベル(該当する場合は回答)を含め、データセットは完全にラベル付けされています。
  • 日付はすでにSTATAの内部日付形式に変換されているため、日付の差などを直接計算することができます。
  • 必要に応じて、変数名はSTATA互換の形式に変換されます。
  • 変数のデータ形式(文字列、整数、浮動小数点数など)基になるデータに従って設定されます(数値が文字列としてエンコードされることはありません)。

STATAにファイルをロードする方法:

  1. STATAのメニューで、File、Import、xml-dataをクリックします。
  2. エクスポートされたファイルを選択して、'OK'をクリックしてください。
STATAのバイナリー形式.dtaファイルが必要な場合は、データをこの形式で再度保存します。


{{Alert|title=注意|text=

  • STATAのデータ形式の制限により、文字列(テキスト)変数の長さは最大244文字(Stataバージョン8-12)、2045文字(Stataバージョン13以上)となります。export pluginの設定でStataのバージョンを設定してください。




  • STATAは数値への値ラベルの付加のみをサポートします。したがって、短い答え(通常は1桁または2桁)に対し、これらに適切なラベルを付けるには、LimeSurveyで数値の回答コードを使用する必要があります(1=完全に同意、など)。数字以外の回答コードを使用する場合(A=完全に同意、など)、完全な回答テキストが回答として使用されます(この例では、'完全に同意')。


回答をSPSSへ出力

SPSS Statisticsは、バッチ型、非バッチ型の統計分析に使用されるソフトウェアパッケージです。公式のSPSSパッケージのほか、SPSSの代替であるGNU PSPPも使用できます。

回答データをSPSSにエクスポートするには、回答と統計セクションに移動し、エクスポートメニューの下にあるSPSS対応オプションを選択します。



以下のページが表示されます。



パネルに以下のオプションが表示されます。

  • 選択データ: どのデータを出力するか、全ての回答・完了のみ・未完了のみから選択できます。
  • SPSSバージョン: SPSSのバージョンについて、16より前か16以降かを選択します。
  • 言語: アンケート回答に使用された言語のみを出力するフィルタとして機能します。
  • レコード数上限: 回答テーブルの最初から"n"個分のエントリーだけをエクスポートする場合は、その数値を入力します。
  • 開始行: 回答テーブルの最初から"n"個分のエントリーを除いてエクスポートする場合は、その数値を入力します。
  • 回答なし: 空白の場合、回答者が回答していない質問については空白の文字列として格納されます。このボックスに任意の文字列を入力すると、空の文字列が置き換えられます。文字列は出力された.datファイルの中に表示されます。

SPSS出力は2つのファイルからなります。

  1. シンタックスファイル(survey_xxxx_SPSS_syntax_file.sps
  2. データファイル(survey_xxxx_SPSS_data_file.dat

ファイルを出力したら、メモ帳のようなテキストエディターで出力データを開き、どのようなものか見ることができます。シンタックスファイルには、データをインポートするときに実行されるコマンドが記載されています。これは、SPSS内部のプログラム言語のようなものです。.datファイルは、すべてのデータがカンマで区切られています。質問やラベルセットなどの情報が失われてしまうため、CSVファイルとしてデータをインポートする方法は推奨しません。


SPSSへのLimeSurvey回答インポート

データをSPSSにインポートするには、以下の手順を実行します。

  1. データファイルとシンタックスファイルをダウンロードします。
  2. SPSS上で、シンタックスファイルをUnicodeモードで開きます。
  3. 'FILE='の行を編集し、ダウンロードしたデータファイルのフルパスを記入します。
  4. メニューから'Run/All'を選択してインポートを実行します。
  5. 以上


VVExport

回答の収集を開始したら、(表計算ツールを使うべきレベルの)大量の回答データを直接編集して変更しなければならない場合があるかもしれません。

VVExport("VV"は垂直検証を意味します)では、回答テーブルを.csvファイルにエクスポートできます。ファイルの全般的な構造がそのまま残っている限り、ファイルの中の値を編集してから、"VVImport"機能を使用してファイルを再度回答テーブルにインポートすることができます。


When do I need to use VVExport and VVImport?

It is often used in three scenarios:

  1. In the first one, it is used to combine large amounts of data in one LimeSurvey installation. Imagine that you run two similar surveys on two different machines. In order to combine the two response tables, you will have to use VVExport, VVImport, and a third-party app (e.g., spreadsheet apps) to combine your data and put it on one LimeSurvey installation.
  2. It may also be used to edit the response table of a survey. For small edits, you can access the response table and edit the desired answers. Still, for "macro-editing", VVExport and VVImport are recommended because a spreadsheet program can help you quickly edit dozens of responses at the same time.
  3. A "vv survey file" allows you to import the responses to a survey when the question/answer combinations have changed. Effectively, this allows you to add or remove questions in an active survey. To add, remove or edit questions, you have to deactivate your survey, do the changes, and then activate it again. The old response table that was created as a result of the response table deactivation can be imported into the newly activated survey by selecting Import -> Import responses from a deactivated survey table. For more details, check this wiki subsection.


データをSPSSにエクスポートするには、回答と統計セクションに移動し、エクスポートメニューの下にあるSPSSに対応するオプションを選択します。



以下のページが表示されます。



  • Survey ID:: The ID of the survey to be exported
  • Export: The completion state of the responses to be exported:
    • Completed responses only: if a respondent reaches the last page of a survey and clicks the Submit button, then his or her response is marked as being complete
    • Incomplete responses only: if a respondent does not click on that Submit button located before the end page, then the response is marked as being incomplete
    • All responses: export both completed and incomplete responses
  • File extension: The file extension. The file is a TSV (tab-separated values) file. For easy opening in MS-Excel set the extension to .txt. If you use LibreOffice, OpenOffice or any other spreadsheet program, you can leave it to .csv (default format)


スプレッドシートの最初の2行は列ラベルです。最初の行は、質問の名前を詳述する"人間が判読可能な"列見出しです。2番目の行は、その回答の実際の列名(内部DBまたはQcode名)です。


  • VV export version: The 1.0 version (Old VV version uses database column headers, version 2.0 (Last VV version) uses Qcode Variable Naming. Version 2.0 is selected by default if all of your question code are unique.


Last VV version allows different column names than the ones from the database. If your question codes are unique, then the new version is selected. In the new version each column name uses the Qcode Variable Naming. The update of surveys is easier in this way.


  Attention : Things you should be aware of:
  • If you want to import responses using "VVImport" make sure to check whether the responses should be added to the existing responses or all responses should be overwritten.
  • If you are trying to import responses from a different yet identical (e.g., identical questions/answers from another survey), make sure you are using the correct vv file and that the first two lines of the .csv file are correct.
  • If you import a survey to your LimeSurvey installation the SID will not change (if possible). The group id and question id however might change. So you might have to adjust the first two heading lines to match the new group id/question id.



VVアンケートファイルを出力

When you choose to export responses using VVExport, you will be given the option to choose whether you want to export all responses or complete responses only or incomplete responses only. The file extension allows you to choose which extension the exported file will have. For easy use, .csv should be chosen.

The first two rows of the spreadsheet/tab-delimited file are the column labels. The first row is a "human readable" column heading that details the name of the question/answer field. The second row is the internal PHP/database column name for that response.

You should not modify the first two rows of this spreadsheet if you want to be able to "import" the data back into LimeSurvey at a later point.

VVファイルの構造 - 例

VVバージョン1 TSVファイル

Response ID	Date submitted	Last page	Start language	Token	please vote from 1 to 6 (1 - super, 6 - worst)
id	submitdate	lastpage	startlanguage	token	46492X40X1991
183	09.11.11 11:44	3	de	jsfhusdgqfygqsy	4
184	09.11.11 11:53	3	de	sdfhsifgsyergze	2
190	09.11.11 11:44	3	de	qsdqshkfhkdsjhj	1


VVバージョン2 TSVファイル

Response ID	Date submitted	Last page	Start language	Token	please vote from 1 to 6 (1 - super, 6 - worst)
id	submitdate	lastpage	startlanguage	token	QCODE
183	09.11.11 11:44	3	de	jsfhusdgqfygqsy	4
184	09.11.11 11:53	3	de	sdfhsifgsyergze	2
190	09.11.11 11:44	3	de	qsdqshkfhkdsjhj	1


ここでは、SQGA識別子は使用されません。代わりに2行目でQcode変数名のQCODEが使用されます。

To understand the difference between SGQA and Qcode, please check the following two wiki sections:

We generally recommend our users to use question codes since they are much easier to be used (it represents an addition to the SGQA system used in the earlier versions of LimeSurvey.


予約名

A .vv file uses left and right brackets for reserved names. When importing, this string is replaced by:

  • {question_not_shown} : NULL value in database. LimeSurvey uses [empty string] for not answered question, and NULL value for questions not shown.
  • {quote} : " (a double quote)
  • {cr} : Carriage return
  • {newline} : A new line
  • {lbrace} : Left bracket (for example, if you want to have {cr} in response : use {lbrace}cr} )


VVアンケートファイルの編集

When a .vv file has been successfully exported you can use a spreadsheet tool to open and edit the file. If you have to choose a column separator when opening the file please use the "Tab" character. If you are using non-ASCII characters make sure you set "UTF-8" as character set.


  If you are using Microsoft Excel to edit the exported vv file, you should know that Excel destroys the original data structure of the file. This causes an error when you try to reimport the edited .vv file. The workaround is to save as a .txt file once you edited the data from the .csv file. If you save as .csv, Excel uses comma-delimits which will not import into LimeSurvey. By saving as a .txt file, Excel saves as a tab-delimited file which can be imported into LimeSurvey. For other Excel-related issues, check this wiki subsection.


If you simply wish to simply edit your data, then be careful at the first two columns so that you can later easily VVImport your data back into your LimeSurvey installation!

If you combine data from two different surveys, please note that the old VV version uses SGQA which will most probably give you different "question ids". Therefore, be careful how you merge the data!

The alternative would be to use the last VV version because question codes can be constant throughout different LimeSurvey installations (if you use the same survey structure across multiple LimeSurvey instances).

When importing the VV file, if two response IDs match and the Exclude record IDs is disabled, you can make LimeSurvey:

  • Report and skip the new record
  • Renumber the new record
  • Replace the existing record
  • Replace answers in file in the existing record
For more information on how to import a VV file, check the following wiki subsection: Import a VV survey file).


その他の出力オプション

In case you do not need to export the whole survey, you can also choose to export only:


単一の回答を出力する

If you want to export an individual response, you can do it in two ways:

1. Login to LimeSurvey, choose your survey, click on Notifications & data tab and make sure you receive basic email notifications:



Every time someone has completed a survey, you will receive an email with a link: "Click the following link to see the individual response". This will take you to a page with a button above the response data saying "Export this response":



Choose how the single response will be exported:



You can observe that no Range export option is displayed since you export only one answer


2. Login to your LimeSurvey installation/instance, choose your survey. Select tab Responses located under the settings tab:



Responses and statistics options are displayed under the settings tab only if the survey is not deactivated.


See the "action" column. Hover the mouse over each option and see which one allows you to see the response details (the first button):



The response entry will be loaded. Click on the "Export this response" button. You will be redirected to a panel from where you can select how the exported file should look like:





As you can observe, you can also export the response as a pdf file:



This option is usually needed when you wish to share to one of your respondents his/her results. In the case in which you wish to share only certain parts of his/her answer, check the pdf export option located in the Statistics panel. In this way, you can hide your hidden questions and/or different assessments you run "in the background".


回答のグループを出力する

This option is useful in the case in which you wish to export a certain group of filtered responses.

To do it, access your Responses table table:



Responses and statistics options are displayed under the settings tab only if the survey is not deactivated.


You can either order the responses according to the value from each column by clicking on the column label or you can type in the empty boxes located below the column labels a string of characters according to which you wish your data to be filtered to.



Not any string of characters may work. It is dependent of the question type. For example, a popup will be displayed for "startdate". For number-based questions, you may use signs such as ">=, <=, <, >" to better filter your data. For the "completed" column, a dropdown box is displayed if you click on "All" (default option), allowing you to filter your response table data according to the completion state of the responses and so on.


Once done, your table should look like the one below. Now, tick all the filtered responses, click on the Selected response(s)... button located in the bottom left side of the response table, and select the Export button:



The export responses pages will be loaded:



The Range column is not displayed since you have already selected the entries you wish to export. To check those IDs, check Selection (see the above screenshot). You can click on Reset if you wish to export all your data instead.