Howdy, Stranger!

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

Supported by

Initial Angle of Trajectory

Hello Pascal,

I was wondering if the mousetrap package in R was capable of producing the initial angle of the trajectory. This is a metric I've seen in Coco and Duran, (2016). They define it as:

"(a) initial degree (the degree of deviation from vertical after the mouse trajectory leaves a 50-pixel radius from the starting point, same as Buetti and Kerzel (2009)), where positive values indicate angles towards the incorrect target"

Thanks for any help you can provide. The mousetrap package has been a huge boon to my research.

Comments

  • edited June 2019

    Hi Mike,

    we do not calculate it directly. However, the mt_angles function calculates the movement angle for every point of the trajectory, including a vertical based angle. If you find a way to filter the trajectory beforehand so it only contains the start point and the point for which you would like to determine the angle (and the end point), you could use it to get the initial movement angle.

    Best,

    Pascal (note: I am currently traveling for the next two weeks without steady internet access, so my replies might be a bit delayed)

  • edited July 2019

    Hi Pascal,

    Thank you again for your assistance! I looked into the mt_angle function and was able to produce a plot and aggregated data. I just wanted to confirm that this workflow and output looks reasonable.

    MT_EXP1 <- mt_import_mousetrap(d.EXP1, 
                                  timestamps_label= "timestamps_get_MT", 
                                  xpos_label = "xpos_get_MT",
                                  ypos_label = "ypos_get_MT") 
    MT_EXP1 <- mt_remap_symmetric(MT_EXP1) 
    MT_EXP1 <- mt_align_start(MT_EXP1)
    MT_EXP1 <- mt_angles(MT_EXP1, unit="degree", na_replace=TRUE)
    
    MT_EXP1_DS <- mt_subset(MT_EXP1, CUESIDE=="DS") 
    
    # plot the angle by timestamps 
    mt_plot_aggregate(MT_EXP1_DS, use = "trajectories",
                     x = "timestamps", y="angle_v",
                     color = "CUE") +
     geom_line(size=2) +
     scale_color_manual(values=c("red", "black")) +
     ggtitle("EXP 1 - LONG DUR (vertical angle)") + theme(plot.title = element_text(hjust = 0.5)) 
    
    # aggregate angles 
    EXP1_ang <- mt_aggregate_per_subject(MT_EXP1_DS, use="trajectories",
                                        use2_variables = "CUE",
                                        subject_id = "subject_nr")
    


    Once I've aggregated the data. Couldn't I just subset the df to the relevant time period (e.g., first 500 ms) to get the initial angle of movement across those timestamps?

    # aggregate angles 
    EXP1_ang <- mt_aggregate_per_subject(MT_EXP1_DS, 
                                        use="trajectories",
                                        use2_variables = "CUE",
                                        subject_id = "subject_nr")
    
    # filter to relevant timeperiod
    EXP1_ang_int <- EXP1_ang %>% filter(timestamps < 500)
    


  • Hi Mike,

    the angle calculation looks fine to me.

    The aggregated plot might be a bit misleading as it averages the values for each specific time point and if one trial only has a recorded position at say timestamp 501 ms it will not be reflected for the timestamp 500. One solution for this could be to use mt_resample before calculating the angle to ensure that the timestamps are identical across trials.

    Afterwards, your code to only look at the first 500 ms is in principle fine in that it will give you the average angle for each timestamp separately for each condition if this is what you want to analyze.

    Best

    Pascal

  • Hi Pascal,

    Thanks for the help and sorry for the late reply. I used the mt_resample function and I'm happy to say that nothing appeared to change because of it. I will keep this in mind for the future. Thank you!

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu http://45.77.173.118/ Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games