Howdy, Stranger!

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

Supported by

mt_measures warning - identical points

After running the mt_measures() function, I am seeing a warning message. Specifically, it says "There were 12 warnings (use warnings() to see them)."

When I look at the warnings, they say,

"Warning messages:

1: In points_on_ideal(current_points, start = start_ideal, ... :

 Start and end point identical in trajectory. This might lead to strange results for some measures (e.g., MAD).

2: In points_on_ideal(current_points, start = start_ideal, ... :

 Start and end point identical in trajectory. This might lead to strange results for some measures (e.g., MAD)."

So forth and so on. This is a data set that I collected and processed several months ago. I don't remember there being warning messages months ago. It's possible that my memory is off--or I never saw it to begin with--but I am highly skeptical off this.

Have there been any changes to the MT package that might mistakenly lead to this warning message? If not, is there a way to identify and remove those trials? (assuming that is the correct thing to do.)

Thanks for your help!

Comments

  • edited January 24

    Hi Mike,

    all changes in the mousetrap package are documented here:

    There have been changes in mt_measures, but none of them were related to the curvature indices (as far as I remember).

    There should be an easy way to check if you have trajectories with equal start and end points (as the message suggests). You could time normalize the trajectories and then check if any have identical start and endpoints like in this example:


    library(mousetrap)

    mt_example <- mt_time_normalize(mt_example)

    table(rowSums(mt_example$tn_trajectories[,1,c("xpos","ypos")] == mt_example$tn_trajectories[,101,c("xpos","ypos")]))


    All 2s in the table would indicate that both the x and the y coordinate at start and end were identical.


    Best,


    Pascal

  • As usual, your response was quick and very helpful. I have resolved my issue. Thank you.

  • Hi,

    I get the same warning message with one of my subdatasets.

    I tried this: mt_example <- mt_time_normalize(mt_example)

    table(rowSums(mt_example$tn_trajectories[,1,c("xpos","ypos")] == mt_example$tn_trajectories[,101,c("xpos","ypos")]))

    And I got this:

      0  1  2 

    980  3  1 

    What can I do with this information? How can I fix the problem?

  • Hi,

    that's interesting. Do you have an idea whether it is in principle possible in your study that start and end points are identical? Usually I would not expect this - except if participants can somehow not give a response in a trial (e.g., if there is a timeout). If that is possible, you should try to exclude trials before importing them into mousetrap, e.g., all trials where no response was given.

    You could also run

    table(mt_count(mt_example$trajectories))
    

    to check how many logs there are in each trial. If there is a trial with very few logs this might indicate a technical problem?

    Best,

    Pascal

  • Hi,

    not answering was not possible in my study.

    I ran your recommended code and got this:

    Unfortunately I am no expert in R or in handling mousetracking data, so I don't understand what this means to my data...

  • Hi,

    this means that you have e.g. 2 trials with only 3 recorded coordinates, 8 trials with only 4 recorded coordinates, 2 trials with only 5 recorded coordinates and so on.

    I think that so few recorded positions are rather unlikely to occur and might point to problems with the software you used for collecting the data (Gorilla?). Or are there maybe some problems during data import? (related to the discussion in the other thread: https://forum.cogsci.nl/index.php?p=/discussion/5744/mt-aggregate)

    You could inspect the trials with few coordinates using the following code:

    # add count variable called nobs
    mt_example <- mt_count(mt_example, save_as="data")
    
    # create subset of trials with fewer than 5 recorded positions
    mt_example_subset <- mt_subset(mt_example, nobs<5)
    
    # look at the corresponding data
    mt_example_subset$data
    


    Best,

    Pascal

Sign In or Register to comment.