--- tags: tutorial --- # Psytoolkit 學習筆記 [toc] --- - [Psytoolkit官網](https://www.psytoolkit.org/) - [Stoet (2017)](https://journals.sagepub.com/doi/10.1177/0098628316677643):開發者Gijsbert Stoet發表於Teaching of Psychology的論文 - [開發者聯絡方式](https://www.psytoolkit.org/contact.html):詢問使用問題;建議;商業使用洽詢;教學用途洽詢 - [使用者論壇](http://psytoolkit.boards.net/) --- ## 特色 - 免費註冊帳號 - 線上管理與執行問卷與實驗腳本 --- - [官方網站登入連結](https://www.psytoolkit.org/#_web_based_login) - [最新版註冊/登入網頁](https://www.psytoolkit.org/c/3.2.0/) --- ## 登入畫面(Introduction) ![](https://i.imgur.com/r37UeXj.png) ## 左側常駐功能列 **General** Psytoolkit版本資訊;帳號設定;求助;詢問;登出。 **Create** 建立實驗腳本;建立問卷腳本;建立實驗刺激列表;取得官方腳本;取得其他使用者實驗腳本。 **Actions** 己建腳本可執行的管理動作。刪除正在編輯的腳本;拷貝其他腳本至正在編輯腳本;更改正在編輯的腳本名稱;下載正在編輯的腳本;分享正在編輯腳本給其他使用者(目前只限實驗腳本)。 --- ## 帳號設定畫面(Settings) ![](https://i.imgur.com/FIpDWE3.png) - **Disk space** 帳號資料已用儲存空間資料 - **Teacher(for use in calss)** 使用者是學生,可在此填入教師註冊psytoolkit的e-mail帳號。使用者是老師,可勾選`Click here if you are a teacher.`,開啟學生活動檢視頁面。 - **Various** 進階設定。腳本編輯視窗顯示行號;已編輯腳本排序方式;腳本編輯畫面起始設定。 --- # 線上問卷 - 標準模式啟始畫面 1. 問卷編輯視窗。測試題目執行之前,請先`Save`。 2. 預定於問卷題目呈現的圖像或音訊檔案,由`Upload files`按"瀏覽"上傳。 3. 按`print`下載問卷腳本odt檔 4. 按`view files`瀏覽、編輯與下載[內置**實驗腳本**](https://hackmd.io/hm00LyR8RR6VhKSg2uE3Bg#%E7%B5%90%E5%90%88%E5%95%8F%E5%8D%B7%E7%99%BC%E4%BD%88%E5%AF%A6%E9%A9%97) ![](https://i.imgur.com/MI1gzp3.png) - 簡易模式啟始畫面 ![](https://i.imgur.com/cvOHqeB.png) - Psytoolkit問卷題目類型一覽 *於簡易模式增加題目即可開啟* ![](https://i.imgur.com/R426EQj.png) --- ## 問卷元素行頭標示 ``` scale: (選設)問卷題目類型是scale,於問卷題目標籤之前設定尺度項目。 l: (必設)問卷題目標籤。題目在這份問卷的識別碼,建議使用大小寫字母與數字組合。 t: (必設)問卷題目類型。可設類型見前圖。問卷題目類型是scale,於問卷題目標籤之前設定尺度項目。 i: (選設)呈現圖片檔案名稱或取得路徑。 a: (選設)呈現音訊檔案名稱或取得路徑。 q: (必設)問卷題目可見資訊。受試者可看見的問題內容描述,可用受試者熟悉語文描述。 o: (選設)問卷題目呈現及反應的選擇性設定。隨機排列選項、限時作答、顯示圖像... - (必設)問卷題目選項資訊。受試者可看見的作答項目,呈現形式依問卷題目類型設定。 ``` - 行頭標示定義問卷題目功能與內容 - 一道問卷問題要有完整的行頭標示,才能正確運作。 - 必設元素已到齊的問卷題目,可在簡易模式預覽執行畫面。 --- ## 問卷題目範例 創建一份新問卷腳本,複製以下內容至問卷編輯視窗,儲存(Save)並編譯(Compile)之後,即可生成問卷發佈網址。 ``` l: example_message t: info q: 您好<br> 這是一份示範用問卷,陳列的題目是psytoolkit支援的問卷題目類型。<br> 存入你的psytoolkit帳號之後,可自行修改,嘗試各種設定的功能。 l: examplequestion1 t: radio q: (單選題)Which of the following foods do you like best? - Rice - Noodles - Bread - Potatoes l: examplequestion2 t: check q: (多選題)Select all of the following drinks did you had today? - Water - Orange juice - Tea - Coffee scale: agree - Disagree - Neither agree nor disagree - Agree l: examplequestion3 q: (李克特量尺)How much do you agree with each of the following t: scale agree - I see myself as Extraverted, enthusiastic - I see myself as Critical, quarrelsome - I see myself as Dependable, self-disciplined - I see myself as Anxious, easily upset l: examplequestion4 t: range q: How old are you parents if alive - {min=18,max=120} Father - {min=18,max=120} Mother l: examplequestion5 t: textline q: (視覺化量尺)Please enter your first name and surname - First name - {require} Surname l: examplequestion6 t: textbox q: (自填答覆)Please enter your feedback - Your first comment (note: no with or height provided) - {w=100,h=5} Your second comment (here we have 100 characters width and 5 lines high - {width=100,height=5} Options spelled out in full works too ``` --- ## 人口背景調查範本 - 多數研究登出前,需要請參與者回覆人口背景調查,分析才能確認這些項目對研究結果的影響。有關調查項目,可參考官方網站提供的[調查項目範本](https://www.psytoolkit.org/survey-library/demographics.html)。 --- ## 問卷題目跳題設定 - 如果實驗問卷或實驗腳本有兩種以上,可使用問卷題目類型*集合*(set)與*跳題*(jump)設定在一份問卷腳本整合不同狀況。 ``` ## 隨機跳題示範 ####### l: AssignBooklet t: set - random 1 2 l: t: jump - if $AssignBooklet == 1 then goto survey01 - if $AssignBooklet == 2 then goto survey02 ## Booklet 1 ############################### l: survey01 t: info - 這是問卷版本1 ... l: go_to_end t: jump - goto end ## Booklet 2 ############################### l: survey01 t: info - 這是問卷版本2 l:end t: info - 這是問卷結尾 ``` --- ## 問卷發佈設定 - 問卷編譯 **發佈最新版問卷之前,必須先按`Compile`** 1. 如果實驗要切換到全螢幕模式,勾選`No red box at start of experiments`能自動切換。 ![](https://i.imgur.com/4ojpT0D.png) - 問卷網址與發佈狀態 1. `Should this survey be online accessible so you can test it or participants can fill it in?` 問卷上線狀態: 不上線; 上線可修改; 上線不可修改。 2. `Link to survey (you can copy this and send to other people)` 上線問卷登入網址。 ![](https://i.imgur.com/K3GRqWR.png) - 問卷網頁設定 1. `Skip introduction/welcome screen` 是否開啟歡迎網頁 2. `Survey interface language and Color scheme` 網頁介面語言與主題佈景(2.5.3版之後有繁體中文) ![](https://i.imgur.com/oxvAxgS.png) 3. `About this survey:` 登入首頁介紹資訊,知情同意書裡的主要說明資訊請寫在這裡,篇幅建議在兩段之內。 4. `Read more section (expandable, for the long boring ethics stuff):`知情同意書裡的輔助說明資訊,篇幅限制一段。 5. `Contact information:` 顯示於歡迎網頁與結束網頁的研究者聯絡資訊。有申請倫理審查者,須與送件內容一致。 6. `Email associated with this research:` 顯示於歡迎網頁的研究者電子郵件。 7. `Consent and ethics information` 知情同意資訊、同意選項說明。勾選顯示,將在登入首頁顯示在此填寫的資訊。 ![](https://i.imgur.com/aIrOlVK.png) 8. `Information shown to the participant in the header of the survey` 問卷畫面標題列資訊:問卷標題、是否顯示完成進度百分比。 9. `At the end of the survey` 問卷結束資訊與登出後網站:是否顯示結束資訊、是否產生實驗完成碼、結束資訊示範(參與者有需要取得完成碼,務必顯示範例資訊) ![](https://i.imgur.com/hSurG27.png) 9. `Allow participants to go back and change questions?` 是否允許參與者重新回答。 10. `Optional requirements for the computer of the participant` 參與者設備要求選項: 如果要求參與者在電腦或筆電做實驗,要勾選*This study requires a real keyboard* 11. `Check this box if the user's internet address/country information should be stored` 是否儲存參與者上網網址與國家地區資訊。 12. `Check this box if you want that user cannot do survey again` 參與者能否以相同的IP再次登入研究網頁 13. `Optional browser exclusion` 過濾參與者登入的瀏覽器要求以及登入設備,如果實驗要在全螢幕模式進行,要排除Safari瀏覽器。 14. `In`與`Out` 特別設定,用於連結Psytoolkit與其他網路實驗平台 ![](https://i.imgur.com/k0hlrSu.png) - 下載作答資料 ![](https://i.imgur.com/kKZB7u7.png) 1. `Prepare datafiles for download` 點擊後產生最新原始資料壓縮檔案。預設有csv格式檔案。 ![](https://i.imgur.com/JUMLpjy.png) --- # 線上實驗 ## 推薦輔助資源 - [TextImages](https://www.sttmedia.com/download=TextImagesEn) 文字轉圖檔 - [FireAlpaca](https://briian.com/8492/) 多語系免費繪圖軟體 - [Inkscape](https://inkscape.org/) 多語系向量圖(SVG)繪圖軟體。[中文教學#01 from official site](https://inkscape.org/zh-hant/doc/tutorials/basic/tutorial-basic.html);[中文教學#02 by Spitter Lin](https://www.youtube.com/watch?v=DgIFtW39bGM&list=UUzVRIHol4ER4uFA9Xlk2agA);[中文教學#03 by 阿簡](https://www.youtube.com/watch?v=Zz7c55bYeBQ&list=PLm6x13NbsKl5rSPMKte7EWvQCrsSCw6iv) - [imgur個人分享圖庫](https://imgur.com/) - [雅婷文字轉語音](https://tts.yating.tw/) <!--- [中文Stroop示範實驗](https://www.psytoolkit.org/cgi-bin/psy2.6.1/survey?s=BGKGL) ---> --- ## 規劃建議 1. 依變項測量資料:限時按鍵反應 -> Experiment;量表選項 -> Survey 2. 獨變項的刺激配置:因子設計 -> Experiment;題本 -> Survey 3. 刺激(圖像、聲音)是外部檔案:有現成資料庫、需要自行製作、... 4. 編輯實驗腳本 --- ## Simon task腳本範例 - [Psytoolkit資料庫的實驗腳本](https://www.psytoolkit.org/experiment-library/simon.html) - 登入畫面 -> `Get from library` -> 搜尋`Simon` -> Select and Copy --- ## 實驗腳本基本參數 [options](https://www.psytoolkit.org/doc2.6.1/syntax.html#options) 螢幕模式、解析度、啟動滑鼠、設定特別參數 [bitmaps](https://www.psytoolkit.org/doc2.6.1/syntax.html#_bitmaps) 設定所有圖檔別名 [sounds](https://www.psytoolkit.org/doc2.6.1/syntax.html#sounds) 設定所有音訊檔別名 [fonts](https://www.psytoolkit.org/doc2.6.1/syntax.html#fonts) 設定呈現文字字型檔(中文字型的支援尚在測試) [table](https://www.psytoolkit.org/doc2.6.1/syntax.html#table) 實驗刺激列表。至少設定一個欄位列出刺激別名,欄位之間以空白分隔。 ``` ## 參數1 參數2 刺激別名 刺激獨變項標記 10 2 bitmap1 "condition one" -10 1 bitmap2 "condition two" ``` [task](https://www.psytoolkit.org/doc2.6.1/syntax.html#task) 實驗作業嘗試程序。依計畫書說明設定。 <!--- message 在指定段落呈現訊息,預設按空白鍵換頁。 ---> [block](https://www.psytoolkit.org/doc2.6.1/syntax.html#block) 實驗作業段落,設定`task`執行次數。 <!--- [blockorder](https://www.psytoolkit.org/doc2.6.1/syntax.html#blockorder) 複數實驗作業段落排列。 ---> --- ## 創建實驗 1. 從頭開始 2. 修改上傳至psytoolkit帳戶的腳本 3. 修改官方或其他使用者分享的腳本 ![](https://i.imgur.com/N6qTgGM.png) 實驗編輯器畫面。每次更新腳本必須按`Save`。 --- ## 範例腳本解析 - 執行選項 ``` options fullscreen #全螢幕模式執行 ``` - 刺激與執行訊息別名列表 ``` bitmaps instruction1 https://imgur.com/12by929.png ... fixpoint ## 以上是執行訊息 yellowyellow https://imgur.com/G7QpXbX.png yellowgreen https://imgur.com/K0URz5R.png ## 以上是實驗刺激 ``` - 實驗刺激列表 ``` ## @1: 獨變項標記~刺激字 刺激字色 相符與否 ## @2: 實驗刺激別名 ## @3: 反應按鍵編號 table stroop "yellow yellow 1" yellowyellow 4 "yellow green 0" yellowgreen 2 "yellow blue 0" yellowblue 3 "yellow red 0" yellowred 1 ``` - 實驗作業嘗試程序 ``` task stroop #宣告實驗作業名稱 table stroop #載入實驗刺激列表 keys r g b y #載入可反應按鍵,順序對應編碼 delay 500 #實驗嘗試啟始,呈現空白螢幕500毫秒 show bitmap fixpoint #呈現凝視點 delay 200 #呈現凝視點200毫秒 clear 1 #結束呈現凝視點 delay 100 #呈現空白螢幕100毫秒 show bitmap @2 #呈現實驗刺激,自實驗刺激列表隨機取得 readkey @3 2000 #呈現實驗刺激2000毫秒,並紀錄反應按鍵 clear 2 #結束呈現實驗刺激 if STATUS == CORRECT #條件判斷:若反應正確 show bitmap correct #呈現正確訊息 fi if STATUS != CORRECT #條件判斷:若反應錯誤 show bitmap mistake #呈現錯誤訊息 fi delay 500 #呈現反應正確或錯誤訊息500毫秒 clear 3 #結束呈現反應正確或錯誤訊息 save BLOCKNAME @1 TABLEROW KEY STATUS RT #儲存本次嘗試反應資訊 ``` - 段落1:實驗指導語 ``` message instruction1 ``` - 段落2:實驗作業 ``` block test # 宣告段落名稱 tasklist stroop 40 # 執行40次實驗作業 end ``` --- ## 編譯及執行實驗 ![](https://i.imgur.com/ViZCW6J.png) - 編譯可執行的實驗腳本。必須按下`Compile`,沒有錯誤訊息,才能測試或執行實驗腳本。按`Run experiment`可進行測試。 - 可成功執行的實驗腳本,點擊`Download for running offline`下載網頁,可上傳至任何網站伺服器,提供使用者測試。 --- ## 結合問卷發佈實驗 ``` l: stroop t: experiment - Stroop_Chinese l: language t: check q: 我的母語是 - 中文 - 英文 - 其他 ``` --- ## 實驗及出口調查腳本 ``` # check the large survey-library for ready-to-run examples you can # cut and paste here l: stroop t: experiment - Stroop_Chinese l: language t: check q: 我的母語是 - 中文 - 英文 - 其他 l: share t: textline q: 我的psytoolkit註冊帳號(電子郵件),稍後分享實驗腳本。 - {require} ``` --- ## 反應資料分析預覽 **一位參與者實驗資料的描述統計** - 載入檔案途徑 (1) 載入已存檔案(Select a stored datafile)~從實驗連結開始的實驗;稍早上傳的檔案 (2) 上傳適用psytoolkit處理格式的原始資料純文字檔(Upload a file)~以問卷模式進行的實驗 (3) 複製貼上適用psytoolkit處理格式的原始資料純文字檔(Copy/paste data instead of uploading datafile)~以問卷模式進行的實驗 - 編碼簿預編:預覽資料表格的欄位資訊 ``` save BLOCKNAME @1 TABLEROW KEY STATUS RT #儲存本次嘗試反應資訊 ``` `BLOCKNAME` 實驗腳本中的段落名稱(block test) `@1` 實驗刺激列表的第一欄資訊 `TABLEROW` 實驗刺激列表(table stroop)的行序 `KEY` 正確反應按鍵(1:r,2:g,3:b,4:y) `STATUS` 反應正誤(1:正確,2:錯誤) `RT` 反應時間 - 資料表格預覽 ![](https://i.imgur.com/ptz3a2O.png) - 資料處理預覽 ![](https://i.imgur.com/IDBmrIW.png) **多位參與者實驗資料的描述統計** ![](https://i.imgur.com/vpvdrSW.png) 預覽多位參與者的分組描述統計結果。評估預試(pilot study),確認實驗設計是否符合計畫。 --- ## 練習:詞彙判斷作業 準備5個有意義的中文詞與5個沒意義的假詞,製作10個嘗試的詞彙判斷作業實驗。 --- # 教師線上協助 使用者如果有教師協助學習,可在帳號設定加入教師的psytoolkit帳號。之後教師可從自已的登入畫面,瀏覽及複製學生編輯的實驗腳本,協助學生排助遇到的問題。 當學生在psytoolkit帳號設定加入教師的帳號之後,教師從`View students`連結查看學生帳號清單,每個學生帳號連結到學生已建立的實驗腳本活動頁面。 ![為保護學生個人資訊隱私,帳號採噴霧處理。](https://i.imgur.com/O0Ndvmb.png) 有學生告知教師問題,教師可登入該學生的活動頁面,觀看學生的已建立的腳本清單。下面畫面是其中一位學生已建立的實驗腳本清單,**Activity**之下未擷圖部分是學生的帳號活動紀錄。 ![為保護學生個人資訊隱私,帳號資訊採噴霧處理。](https://i.imgur.com/E7b52Jh.png) 「詞彙判斷作業」是教師指派的作業,可進入以下頁面,複製腳本至教師帳號檢查,再回覆學生解決問題的方法。 ![為保護學生個人資訊隱私,帳號資訊採噴霧處理。](https://i.imgur.com/IzniDWG.png) **小重點:psytoolkit的腳本名稱必須為英文**