Publications by Jay Lasker
Testing Factor Models with Behavior Genetics
Setup Packages library(pacman) p_load(lavaan, DT, psych, semPlot) Data OSBO <- read.csv("OsborneUmx.csv") OSBOA <- read.csv("OsboAlt.csv") NMTP <- read.csv("nmgen.csv") Goodness of Fit Indices GFIT <- c("logl", "df", "npar", "aic", "bic", "chisq", "pvalue", "tli", "rmsea") Rationale Common and independent pathway models allow behavior gene...
23890 sym R (121640 sym/81 pcs) 19 tbl
The Study of Latin American Intelligence (SLATINT)
Setup Libraries library(pacman) p_load(psych, lavaan, ggplot2) Data #Correlation matrices lowerSpain = ' 1 0.57 1 0.283 0.449 1 0.148 0.31 0.497 1 0.381 0.457 0.557 0.558 1 0.158 0.145 0.16 0.1...
3263 sym R (12401 sym/36 pcs) 3 img
Cooper & Zubek Power Analysis
library(pacman) p_load(pwr, knitr, ggplot2, reshape2) TD <- function(t, n1, n2){ d = t*sqrt((1/n1)+(1/n2)) return(d)} dfi <- read.csv("RatZub.csv") Rationale Tabery’s (2009) review of Sesardic’s Making Sense of Heritability (2005) referenced Cooper & Zubek’s (1958) study of the effects of environments on maze running performance...
16870 sym R (4166 sym/19 pcs) 3 img 1 tbl
HEXACO - Saudi Arabian Sample
Setup Packages library(pacman) p_load(psych, VIM, lavaan, dplyr) Data HSA <- read.csv("HSA.csv") HSA <- HSA %>% mutate( Q30 = -Q30, Q12 = -Q12, Q60 = -Q60, Q42 = -Q42, Q24 = -Q24, Q48 = -Q48, Q53 = -Q53, #Q35 = -Q35, Q41 = -Q41, Q59 = -Q59, Q28 = -Q28, Q52 = -Q52, Q10 = -Q10, Q46 = -Q46, Q9 = -Q9, Q15 = -Q15, Q57 = -Q57, Q...
5265 sym R (68408 sym/139 pcs) 4 img
Dunning-Kruger Effect
Setup Packages and Functions library(pacman) p_load(psych, dplyr, umx, lavaan, ggplot2, plyr, stringr, reshape, ggthemes, skedastic) DKG <- function(n = 10000, r = 0.3, test_mean = 100, test_sd = 15, bins = 4, up_bias = 7.5){ require(egg) set.seed(1) true_score = rnorm(n) est_score = true_score * r + rnorm(n) * sqrt(1- r^2) true_sc...
3951 sym R (12564 sym/53 pcs) 13 img
Binomial Effect Size Display
Setup Functions BESD <- function(r){ PC = 0.5 * abs(r) + 0.5 return(message(paste("Your probability of correct classification using a predictor with a performance correlation of", r, "is", PC)))} BESDV <- function(v){ v = v/100 r = sqrt(v) PC = 0.5 * abs(r) + 0.5 return(message(paste("Your probability of correct classificatio...
1749 sym R (5722 sym/20 pcs) 1 img
Latent Socioeconomic Status?
Setup Packages library(pacman) p_load(dplyr, psych, lavaan) Functions BESDS <- function(r){ PC = 0.5 * abs(r) + 0.5 return(PC)} OmegaU <- function(x){ require(lavaan) IN <- inspect(x, 'std')$lambda #maybe ^2? I don't think so due to path tracing rules GL <- sum(IN); DT <- attributes(IN)$dimnames[[1]] FL <- x@call; DF <- eva...
8658 sym R (15474 sym/39 pcs)
Spearman's Hypothesis Properly
Startup Functions #Congruence coefficient formula because Psych's fa.congruence function is broken CONGO <- function(F1, F2) { PHI = sum(F1*F2) / sqrt(sum(F1^2)*sum(F2^2)) return(PHI)} #Cohen's d or Hedge's g to point-biserial RPBS <- function(d) { RPB = d / sqrt(d^2 + 4) return(RPB)} Equations \[\phi = \frac{\Sigma(\lambda_1 ...
40721 sym R (267297 sym/497 pcs) 93 img
The Modified Achievement Goal Questionnaire - MGCFA Extension
Setup library(pacman) p_load(lavaan, semPlot, ggplot2, psych, efast) #Correlation matrices lowerEUR = ' 1 0.624 1 0.641 0.687 1 0.198 0.333 0.252 1 0.119 0.229 0.19 0.368 ...
3815 sym R (10417 sym/20 pcs) 2 img
Just One g
Setup #Packages library(pacman) p_load(dplyr, DT, meta, DescTools, ggplot2) #Data JOG <- read.csv("E:/Research/JustOneg/JOGMetaPART.csv") datatable(JOG, extensions = c("Buttons", "FixedColumns"), options = list(dom = 'Bfrtip', buttons = c('copy', 'csv', 'print'), scrollX = T, fixedColumns = list(leftColumns = 3))) #Ad hoc functions mul...
1940 sym R (26770 sym/17 pcs) 5 img