Skip to content

Instantly share code, notes, and snippets.

@soodoku
soodoku / readme.md
Last active September 13, 2025 22:22
Personality Change

Personality Change

Personality psychology reports "moderate stability" of traits across adulthood, but what does this mean for individuals? We simulated how likely someone is to obtain similar Big Five personality test results over a 30-year span, critically accounting for measurement error.

Method: We generated 10,000 individuals with Big Five traits following a multivariate normal distribution with empirical intercorrelations (e.g., Neuroticism with Extraversion: -0.22). We modeled personality at Time 2 using the test-retest formula: New_Score = Old_Score × r + error × √(1-r²), adding measurement error (reliability = 0.82, per Gnambs 2014) at both time points. We defined "meaningful change" as shifts exceeding 0.5 standard deviations. Crucially, we established a baseline scenario with perfect stability (r=1.0) to isolate measurement error effects, finding that 33% appear to change due to measurement error alone. We then examined: Soldz & Vaillant's (1999) 30-year correlations (E: 0.19, N: 0.20, O: 0.3

@soodoku
soodoku / sentiment.py
Last active August 20, 2025 23:37
Ribeiro Style Robustness Checks
# -*- coding: utf-8 -*-
"""sentiment_ribeiro_style_checklist.ipynb
Automatically generated by Colab.
Original file is located at
https://colab.research.google.com/drive/1uyBg9-sidauCSSO6dcztl552HVSAgkUJ
"""
"""
@soodoku
soodoku / Continuous Hinger.md
Last active April 15, 2025 21:32
Continuous Hinge Function
@soodoku
soodoku / tariffs.ipynb
Last active April 3, 2025 17:29
Tariffs
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@soodoku
soodoku / Readme.md
Last active March 5, 2025 01:05
i4replication scraper

Scraping the abstracts for the discussion papers by i4replication.org.

@soodoku
soodoku / readme.md
Last active May 14, 2025 11:36
RQ Boot Results to Latex Table

RQ Boot to Latex

ModelSummary and Stargazer fail when RQ s.e. calculation fails

stargazer(m_demo_int_qr)
Error in base::backsolve(r, x, k = k, upper.tri = upper.tri, transpose = transpose,  : 
  singular matrix in 'backsolve'. First zero in diagonal [13]
@soodoku
soodoku / bihar_jati_2022.csv
Last active November 2, 2023 23:45
Bihar Jati 2023
page क्र ० सं ० जाति आंकड़ा प्रतिशत ( % )
0 1 अघोरी 9039 0.0069 %
0 2 अदरखी 30857 0.0236 %
0 3 अबदल 11433 0.0087 %
0 4 अमात 285221 0.2182 %
0 5 अवध बनिया 41643 0.0319 %
0 6 असुर , अगरिया 7706 0.0059 %
0 7 इदरीसी या दर्जी ( मुस्लिम ) 329661 0.2522 %
0 8 ईटफरोश / ईटाफरोश / गदहेड़ी / ईटपज इब्राहिमी ( मुस्लिम ) 9462 0.0072 %
0 9 इसाई धर्मावलंबी ( हरिजन ) 9708 0.0074 %
@soodoku
soodoku / TrainingV3.ipynb
Created October 8, 2023 19:14
Facial Sentiment Classifier
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@soodoku
soodoku / senator_ed.csv
Last active April 15, 2025 23:40
education of a senator
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
State,Name,Party,Rel.,Prior Exp.,Education,Year in,Born,Top College,R Top Coll.,D Top Coll.,Ad. Degree,R ,D
Alabama ,Richard Shelby ,Republican ,Presbyterian ,"U.S. House, Alabama Senate ","Alabama (BA, JD) ",1987,1934,,0,0,1,1,0
Alabama ,"Sessions, JeffJeff Sessions ",Republican ,Methodist ,Alabama Attorney General ,"Huntingdon College, University of Alabama ",1997,1946,,0,0,1,1,0
Alaska ,"Murkowski, LisaLisa Murkowski ",Republican ,Roman Catholic ,Alaska House of Representatives ,"Georgetown, Willamette ",2002,1957,,0,0,1,1,0
Alaska ,"Begich, MarkMark Begich ",Democratic ,Roman Catholic ,Mayor of Anchorage ,University of Alaska Anchorage (attended) ,2009,1962,,0,0,,0,0
Arizona ,"McCain, JohnJohn McCain ",Republican ,Baptist[1] ,"U.S. House, military ",U.S. Naval Academy[2] ,1987,1936,,0,0,1,1,0
Arizona ,"Kyl, JonJon Kyl ",Republican ,Presbyterian ,U.S. House ,"Arizona (BA, JD) ",1995,1942,,0,0,1,1,0
Arkansas ,"Lincoln, BlancheBlanche Lincoln ",Democratic ,Episcopalian ,U.S. House ,"Randolph-Macon Women\'s C