{"id":196,"date":"2020-04-29T13:18:04","date_gmt":"2020-04-29T13:18:04","guid":{"rendered":"https:\/\/webtrackr.de\/?p=196"},"modified":"2020-04-29T13:18:04","modified_gmt":"2020-04-29T13:18:04","slug":"analyzing-the-experiment","status":"publish","type":"post","link":"https:\/\/webtrackr.de\/index.php\/2020\/04\/29\/analyzing-the-experiment\/","title":{"rendered":"Analyzing the Experiment"},"content":{"rendered":"<p>In order to analyze the data with R Studio, please install the following libraries. R-Code is displayed bold.<\/p>\n<p><strong>library(mousetrack)<\/strong><br \/>\n<strong>library(mousetrap)<\/strong><br \/>\n<strong>library(ssMousetrack)<\/strong><br \/>\n<strong>library(ggplot2)<\/strong><br \/>\n<strong>library(readbulk)<\/strong><br \/>\n<strong>library(dplyr)<\/strong><br \/>\n<strong>library(foreign)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Importing of the files:<\/p>\n<p><strong>mt_data_raw &lt;- read_bulk(extension=&#8220;.txt&#8220;)<\/strong><br \/>\n<strong>rawdata &lt;- mt_import_wide(mt_data_raw)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Remapping choices to left\/right<\/p>\n<p><strong>mydata&lt;-mt_remap_symmetric(rawdata, use = &#8222;trajectories&#8220;, save_as = &#8222;trajectories&#8220;,<\/strong><br \/>\n<strong>dimensions = c(&#8222;xpos&#8220;, &#8222;ypos&#8220;), remap_xpos = &#8222;left&#8220;,<\/strong><br \/>\n<strong>remap_ypos = &#8222;up&#8220;)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Calculating measures like area under the curve<\/p>\n<p><strong>mydata2&lt;-mt_measures(mydata, use = &#8222;trajectories&#8220;, save_as = &#8222;measures&#8220;,<\/strong><br \/>\n<strong>dimensions = c(&#8222;xpos&#8220;, &#8222;ypos&#8220;), timestamps = &#8222;timestamps&#8220;,<\/strong><br \/>\n<strong>flip_threshold = 0, hover_threshold = NULL, verbose = FALSE)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Plotting all trajectories<\/p>\n<p><strong>mt_plot(rawdata)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p>Alligning all start points<\/p>\n<p><strong>mydata&lt;- mt_align_start(mydata)<\/strong><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/pascalkieslich.github.io\/mousetrap\/reference\/mousetrap.html\">For a full list of other commands please see Pascal Kieslich&#8217;s page.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to analyze the data with R Studio, please install the&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-196","post","type-post","status-publish","format-standard","hentry","category-statistical-analysis"],"_links":{"self":[{"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/posts\/196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/comments?post=196"}],"version-history":[{"count":0,"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/posts\/196\/revisions"}],"wp:attachment":[{"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/media?parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/categories?post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webtrackr.de\/index.php\/wp-json\/wp\/v2\/tags?post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}