Publications by Jay Lasker

Probability of Superiority Curves: A Better BESD

12.07.2023

Setup library(pacman); p_load(ggplot2, posc) my_theme <- function(){ theme( legend.background = element_rect(colour = "black", linewidth = 0.5), legend.key.width = unit(0.5, "cm"), legend.key.height = unit(0.4, "cm"), panel.background = element_rect(fill = "white"), plot.background = element_rect(fill = "white"), ...

3938 sym R (9997 sym/24 pcs) 11 img

Birth Order Effects on Status

02.07.2023

Setup library(pacman); p_load(ggplot2, openxlsx, tidyverse, fixest) # You can get the data from https://www.pnas.org/doi/10.1073/pnas.2300926120 # vars1 <- openxlsx::read.xlsx("pnas.2300926120.sd01.xlsx", sheet = 1) # sd1 <- openxlsx::read.xlsx("pnas.2300926120.sd01.xlsx", sheet = 2) # sd1 <- as_tibble(sd1) vars2 <- openxlsx::read.xlsx("pn...

1125 sym R (16117 sym/60 pcs)

The Flynn Effect in Spain, 1992-2022

29.06.2023

Setup library(pacman); p_load(lavaan) SDI2.UDI2 = function(p, loading1, loading2, intercept1, intercept2, stdev2, fmean2, fsd2, nodewidth = 0.01, lowerLV = -5, upperLV = 5) { LV = seq(lowerLV,upperLV,nodewidth) DiffExpItem12 = matrix(NA,length(LV),p) pdfLV2 = matrix(NA,length(LV),1) SDI2numerator = matrix(NA,length(LV),p) UDI2...

3162 sym R (29130 sym/12 pcs)

Equilibrium Heritability

27.06.2023

Setup library(pacman); p_load(ggplot2, scales) my_theme <- function(){ theme( legend.background = element_rect(colour = "black", linewidth = 0.5), legend.key.width = unit(0.5, "cm"), legend.key.height = unit(0.4, "cm"), panel.background = element_rect(fill = "white"), plot.background = element_rect(fill = "white"), ...

5720 sym R (6736 sym/5 pcs) 2 img

Intelligence Can Be Measured via Neural Processing Speed

17.06.2023

library(pacman); p_load(lavaan, psych) data <- read.csv("NPSIQ.csv") FITM <- c("chisq", "df", "nPar", "cfi", "rmsea", "rmsea.ci.lower", "rmsea.ci.upper", "aic", "bic") describe(data) Rationale Schubert et al. (2022) assessed the relationship between the latent general factor of the latencies of event-related potentials (ERP) assessed duri...

10278 sym R (208441 sym/21 pcs)

Dyscalculia Measurement in Hungary

14.05.2023

library(pacman); p_load(readxl, tidyr, dplyr, tidyverse, psych, ggplot2, cowplot, sandwich, lmtest, ggcorrplot, lavaan, semPlot, lavaanPlot) HCReg <- function(Formula, Data, HC = "HC5"){ require(sandwich); require(lmtest) BaseModel <- lm(Formula, Data) VC <- vcovHC(BaseModel, type = HC) coeftest_results <- coeftest(BaseModel, vcov = V...

7118 sym R (102241 sym/94 pcs) 6 img

The Law School Admissions Test, Race, and Threshold Selection

16.03.2023

Setup library(pacman); p_load(ggplot2, dplyr, tidyverse) # Cohen's d function Cohensd <- function(M1, M2, SD1, SD2, N1 = 1, N2 = 1, rnd = 3){ SDP = sqrt((SD1^2 + SD2^2)/2) SDPW = sqrt((((N1 - 1) * SD1^2) + ((N2 - 1) * SD2^2))/(N1 + N2)) d = (M2 - M1)/SDP delta = (M2 - M1)/SD1 g = (M2 - M1)/SDPW if (N1 & N2 <= 1) {cat(paste0("W...

4173 sym R (12890 sym/40 pcs) 6 img

Personal ggplot2 Theme

15.03.2023

Here’s some code for a ggplot theme library(pacman); p_load(ggplot2, tidyverse) my_theme <- function(){ theme( legend.background = element_rect(colour = "black", linewidth = 0.5), legend.key.width = unit(0.5, "cm"), legend.key.height = unit(0.4, "cm"), panel.background = element_rect(fill = "white"), plot.background ...

79 sym R (5671 sym/9 pcs) 6 img

Height Polygenic Scores Work in Premodern Human Populations

10.03.2023

Setup library(pacman); p_load(ggplot2, ggthemr, DT, sandwich, lmtest, robustbase, plyr) ggthemr("dust") set_swatch(c("#555555", "#db735c", "#EFA86E", "#9A8A76", "#F3C57B", "#7A6752", "#2A91A2", "#87F28A", "#6EDCEF", "#AA65C7", "#F1948A", "#C7C065", "#E1DFC9", "#819FC7", "#AD1D47", "#E1B24C", "#78B380", "#4A56EA", "#E...

6931 sym R (38683 sym/49 pcs) 4 img

An Example of Unusable German Student Lockdown Data

09.03.2023

Setup library(pacman); p_load(lavaan, psych, DT) FITM <- c("chisq", "df", "nPar", "cfi", "rmsea", "rmsea.ci.lower", "rmsea.ci.upper", "aic", "bic") datatable(An1Data, extensions = c("Buttons", "FixedColumns"), options = list(dom = 'Bfrtip', buttons = c('copy', 'csv', 'print'), scrollX = T, fixedColumns = list(leftColumns = 3))) datatable(An2Da...

1450 sym R (39163 sym/98 pcs) 3 img