Dan Kleinman
@dankleinman.bsky.social
1.3K followers 640 following 150 posts
Research scientist at Yale Child Study Center (formerly Haskins Labs). PhD. Interested in language, dyslexia, bilingualism, EEG, stats. Proponent of summary limericks. I probably drink more tea than you. Posts are ~50% science; opinions are 100% my own.
Posts Media Videos Starter Packs
Pinned
dankleinman.bsky.social
I study language-related topics including dyslexia and bilingual language switching, and post mainly about science, wordplay, and tea. I follow academics, journalists, and anyone who knows a lot about a topic and isn’t afraid to show it (lawyers, music theorists). Always happy to learn new things!
dankleinman.bsky.social
“This shirt is ‘dry-clean only’. Which means… it’s dirty.” –Mitch Hedberg
dankleinman.bsky.social
Me: It's nice not having a lot of meetings these days!
Zoom: You were saying...?
A notification on MacOS: "zoom.us" Is Accessing Your Screen. "zoom.us" has accessed your screen and system audio 4417 times in the past 90 days
dankleinman.bsky.social
Saw this for the first time last year (in the theater!) and had the same thought. As a psycholinguist, I loved that is-he-or-isn’t-he aspect to the hallucinatory speech restoration — same with the ever-changing emphasis on the word “us” in the key sentence. Talk about shades of meaning!
dankleinman.bsky.social
I’m working with an RA now on a research project in which she characterizes the errors made by students with dyslexia during a phonological processing task. Lots of granular detail and discussions about “What processes could have produced this?” Just delightful stuff (if somewhat painstaking).
dankleinman.bsky.social
Nice! I find there’s something clarifying about trying to describe (or reading others describe) behavior(/speech) closely, especially in less structured situations. Paradigms usually allow us to take those things for granted! Always feels to me like a return to the roots of the field.
dankleinman.bsky.social
Reminds me of that paper listing all the ways people describe effects with p-values north of .05.
dankleinman.bsky.social
I call this the “get on my lawn” trope.
dankleinman.bsky.social
Reminds me of an old lawsuit: A guy went to an all-you-can-eat sushi place in LA and removed all the rice from each piece. The owner said it wasn’t all-you-can-eat sashimi, and that he relied on customers filling up on rice. The customer — a diabetic — sued for discrimination (and I think lost).
dankleinman.bsky.social
You must have some cheap ice cream places near you, then — that would cost around $8/lb. where I live. Might make sense if you want to stock up your pantry on sprinkles, though…
dankleinman.bsky.social
It’s okay not to understand contrast coding (though it’s important to learn). But *everyone* should be able to look at their model output and say, “This doesn’t match what I’m seeing in my data, and I need to understand why before proceeding.” Don’t just throw up your hands and trust your model!
dankleinman.bsky.social
For instance, I have reviewed multiple papers which used linear mixed-effects models to analyze data and reported effects that are impossible to see in the tables or figures — because they were using treatment-coded contrasts but they interpreted them (incorrectly) as sum-coded contrasts.
dankleinman.bsky.social
This is a nice description of what I call “passing the smell test”. Fancy stats can be very useful (I occasionally rely on them!), but it’s critical to look for converging evidence that an effect is “real” rather than blindly trusting the results of a model (which could be misspecified).
An excerpt from kareemcarr.substack.com:

“Learning the content itself

This is what people usually imagine when they think of “learning statistics,” but it is only the fourth step. In my view, real skill in statistics rests on five interconnected competencies:

Data sense. The ability to tell when data “looks right” or “looks wrong” after a transformation or analysis. You develop an eye for the patterns that should be there, and a nose for the ones that signal trouble.”
dankleinman.bsky.social
We had a nice conversation about null/alternative hypotheses and data generation. We also talked about how a paper can be useful for some things (ideas, data coding) but not others (stats).

At any rate: Please don't do stats this way!
dankleinman.bsky.social
You will not be surprised to learn that the results were significant, t(4) ≈ 9.

To explain to my RA why this is not a good idea, we ran some simulations. If you throw a 6-sided die 6 times and then compare the lower & higher values, p(p<.05) = 41%. Throw it 8 times, p = 85%. 10 times, p = 97%.
dankleinman.bsky.social
Specifically, the author saw that some students made more errors than others. He divided them into two groups of 3 based on their error counts, then used a t-test to compare the number of errors they made.

🤯

(I'm not even clear on why – I think he wanted to show that performance was variable.)
dankleinman.bsky.social
Read a paper the other day from the early 1990s which reported an in-depth analysis of reading/writing/spelling errors made by 6 students. The main focus of the paper was the detailed coding scheme used to classify the errors. But! – there was also a statistical analysis comparing their performance.
dankleinman.bsky.social
n.b. This worked perfectly for the tables I loaded (which I verified by comparing every cell). However, I don't know whether all JMP features are supported, so make sure you check your inputs/outputs given the features you use.
dankleinman.bsky.social
The process couldn't be easier. After getting packages installed and loaded, you read in the data using Julia command readjmp() (within R command julia_command()) and then transfer the result to the R workspace using julia_eval(). Magic!
# set up JuliaCall, specifying Julia dir
library(JuliaCall)
julia <- julia_setup(JULIA_HOME='/Applications/Julia-1.8.app/Contents/Resources/julia/bin/')

# install and load relevant package to open JMP files
julia_install_package_if_needed("JMPReader")
julia_library("JMPReader")

# read in data
julia_assign("filepath", "~/Desktop/mydata.jmp")
julia_command("df = readjmp(filepath)")
# transfer to R
df <- julia_eval("df")
dankleinman.bsky.social
The R package JuliaCall (cran.r-project.org/web/packages...), which allows you to call Julia commands from R. It also allows you to install Julia directly from the R command line, though that piece didn't work for me so I installed Julia separately (v1.8.5; later versions may not be compatible).
README
cran.r-project.org
dankleinman.bsky.social
The key ingredient is Jaakko Ruohio's Julia package JMPReader (github.com/jaakkor2/JMP...), which can import JMP's proprietary data tables into Julia using the command readjmp(). I don't use Julia, though, which brings us to the other half of the solution:
GitHub - jaakkor2/JMPReader.jl: JMP data tables reader for Julia language
JMP data tables reader for Julia language. Contribute to jaakkor2/JMPReader.jl development by creating an account on GitHub.
github.com
dankleinman.bsky.social
In "news that will be very exciting to a small group of people", I discovered today that – a full decade after I first wished for this feature – it is now possible to read JMP files into R!
A text thread between two people. First text: "I JUST SUCCESSFULLY READ A JMP DATA FILE INTO R". Response: "WHAT"
dankleinman.bsky.social
@nytxworeo.bsky.social is going to have a very exciting day tomorrow
dankleinman.bsky.social
If that EEG means she is saying to herself “Oh my God!”, then I too am generating a similar reading