←
Dagmar Fraser @dagmarfraser.bsky.social2,750 posts
Dagmar Fraser @dagmarfraser.bsky.social avatar

Dagmar Fraser @dagmarfraser.bsky.social

@dagmarfraser

Doctoral Researcher at the Autism, Social Cognition & Bodily Movement Lab (jencooklab.com), Senior Centre Technician at @TheCHBH, MATLAB Ambassador, He/Him.

◷ Joined March 2009▧ 56 Photos and videos
Dagmar Fraser @dagmarfraser.bsky.social avatar
Dagmar Fraser @dagmarfraser.bsky.social@dagmarfraser·3 Apr 2025

🎉 New paper alert! 🧠 The velocity-curvature power law is one of the 'kinematic laws of nature' (Flash 2021), a 'fundamental law of human control' (Zago et al. 2016), and one of the 'kinematic regularities' (Frith & Frith 2023) thought to underlie all biological motion. 1/9

Dagmar Fraser @dagmarfraser.bsky.social avatar
Dagmar Fraser @dagmarfraser.bsky.social@dagmarfraser·Jan 6

Call R from MATLAB and read the result: system('Rscript icc_calc.R'); result = readtable('icc_out.csv'); icc31 = result.ICC(3); % Row 3 = ICC(3,1) Four lines of MATLAB, three of R, CSV bridges in the middle. Unsophisticated but reproducible.

Dagmar Fraser @dagmarfraser.bsky.social avatar
Dagmar Fraser @dagmarfraser.bsky.social@dagmarfraser·Jan 6

Example scripts - Write CSV from MATLAB writetable(array2table(data), 'icc_data.csv'); Create a wee R script - icc_calc.R # icc_calc.R library(psych) d <- read.csv('icc_data.csv') write.csv(ICC(d)$results, 'icc_out.csv')

Dagmar Fraser @dagmarfraser.bsky.social avatar
Dagmar Fraser @dagmarfraser.bsky.social@dagmarfraser·Jan 6

After switching to the correct package: Mean |dif|: 0.0004 Max |dif|: 0.008 Agreement to four decimal places. Conclusion: Salarian's 2016 FileExchange code is solid (for my data at least!). Two reference papers, same answer. I can sleep easy. 😴

Dagmar Fraser @dagmarfraser.bsky.social avatar
Dagmar Fraser @dagmarfraser.bsky.social@dagmarfraser·Jan 6

Rather than learn R properly, I launched it via system() calls and exchanged data through CSV files. It works on Mac and Windows. 🪟🍎 First run: 3-11% disagreement. Mild panic 😰 Turns out there are multiple R packages for ICC, each computing different variants.

Dagmar Fraser @dagmarfraser.bsky.social avatar
Dagmar Fraser @dagmarfraser.bsky.social@dagmarfraser·Jan 6

Follow-up to my ICC thread from last week 🧵 I wanted to test Salarian's MATLAB FileExchange code. Thanks to @cchapman.bsky.social for pointing me toward R. I took it further than perhaps intended.

New experience today 🎓: I set up an experiment to check the test–retest stability of my favourite kinematic measure: Lacquaniti’s 1/3 power law. A velocity–curvature relationship that results in a kinematic invariance which might underlie all biological motion.

Dagmar Fraser @dagmarfraser.bsky.social avatar
Dagmar Fraser @dagmarfraser.bsky.social@dagmarfraser·30 Dec 2025

But… last updated in 2016. How far do we trust “random” code? 🤔 I will havw to write some tests. This is the reality of (apparently!) niche stats in MATLAB, community-driven, not MathWorks-authored. Who do I have to bribe to get it added?