Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

mousetrap merging trajectories

edited September 2022 in Mousetrap

Hello I am currently running my experiment with mousetrap.os and trying to analyse the data. In my results, I can see trajectories were saved under different variables corresponding to different blocks in my design (here I got 4 blocks: block_c, block_diff, block_mixed and block_s). This is how it looks in one subject's .csv file:

According to my design, each trial should contain only one trajectory, so for example, xpos in block_c should all be stored in "xpos_get_response_c", and NAs in other columns.

However, when switching to the next block, for example, from block_c to block_s, the last trajectory was copied and pasted throughout that column..

...and when I go to the last block (block_diff), all four columns were filled

This makes a problem when I run "mt_import_opensesame", only the first column of trajectories (in this case, xpos_get_response_c) was kept and it makes the raw trajectories/tn_trajectories weird (probably the redundant trajectory was overweighted). Here is what I put for "mt_import_opensesame":

mt_data <- mt_import_mousetrap(mt_data_raw, 
                xpos_label = c("xpos_get_response_c", "xpos_get_response_s",
                       "xpos_get_response_mixed","xpos_get_response_diff"),
                ypos_label = c("ypos_get_response_c", "ypos_get_response_s",
                       "ypos_get_response_mixed","ypos_get_response_diff"),
                timestamps_label = c("timestamps_get_response_c", "timestamps_get_response_s",
                       "timestamps_get_response_mixed","timestamps_get_response_diff"),
                digits = 2)

Could you please tell me if there is anything I have done it wrongly? Or shall I change any setting in my mousetrap.os file? Thank you so much!


Best,

Wenting

Comments

  • I now convert those redundant data all to 'NA' (in all columns with "get_response") and just merge all those columns under the same variable to one column (e.g., xpos_get_response_c, xpos_get_response_s, xpos_get_response_diff, xpos_get_response_mixed now are merged to one column named xpos_get_response). Now it works if I just run:

    mt_data <- mt_import_mousetrap(mt_data_raw, digits = 2)
    

    But I wonder if there is any other easier way to do it...

    Wenting

  • Hi there,

    that's a good question.

    Maybe first a comment regarding "the last trajectory was copied and pasted throughout that column": That's a general behavior in OpenSesame. Whenever there is a logger item, the current state of all variables is logged in the script. This means that - if a certain response variable does not change anymore - its last "state" (i.e., the last response) will be carried forward.

    In the current data format, I would also go with your approach (i.e., merging the different columns into one). I would probably do this using an if else / case when statement (depending on the language you use for analysis) that checks in which block you are (I assume you have a variable that records it) and depending on that variable selects the appropriate response column.

    In a future experiment, you could maybe reuse the same mousetrap_response item by creating a linked copy (in case that none of the settings needs to be modified).

    Best regards,

    Pascal

Sign In or Register to comment.