Publications by Jay Lasker

Check your Checksums

21.12.2021

Rationale detachPackages <- function(){ basic.packages <- c("package:stats","package:graphics","package:grDevices","package:utils","package:datasets","package:methods","package:base") package.list <- search()[ifelse(unlist(gregexpr("package:",search()))==1,TRUE,FALSE)] package.list <- setdiff(package.list,basic.packages) if (length(pa...

1549 sym R (1754 sym/7 pcs)

Reanalysis of Pesta et al. (2020)

18.12.2021

Setup library(pacman); p_load(dplyr, psych, dmetar, meta, metapower, brms, MCMCglmm) Rationale This is a reanalysis of Pesta et al. (2020). The point is to estimate the power. This uses the data from Table 2 and is relegated to the Black and White subgroups, since they are the only ones I would regard as plausibly well-represented. It compares ...

10438 sym R (29475 sym/84 pcs) 6 img

Testing Explanations for the Gender Equality Paradox

22.11.2021

Setup Packages library(pacman); p_load(psych, lavaan, dplyr, sjmisc, sandwich, lmtest, ggplot2, effsize, GenAlgo) Data Variables to scroll through. Data from https://osf.io/t4rms/. psych::describe(IPIPA) ## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning Inf ## Warning in FUN(newX[, i], ...): no non-missing arguments ...

22747 sym R (315864 sym/385 pcs) 50 img

dMACS_Signed

16.11.2021

Setup The Goal I wanted a function for dMACS_Signed to allow for the quick computation of bias directions with respect to indicator variables in multi-group structural equation models. The formula for dMACS is \[d_{MACS} = \frac{1}{SD_{jPooled}}\sqrt{\int (\hat{Y}_{j1}-\hat{Y}_{j2}|\eta)^2\cdot f_2(\eta)d\eta}\] whereas dMACS_Signed is \[d_{MACS...

1601 sym R (3840 sym/13 pcs)

A Trendbreak in Homicide Rates in 2020?

23.09.2021

Setup and Data Datasets used: CDC WONDER Underlying Cause of Death 1999-2019 Request; Monthly Provisional Counts of Death by Select Causes, 2020-2021. Homicides used in both cases (names in datasets differed). Population (POPTHM), from FRED. data$Date <- as.Date(data$Date, format = "%Y-%m-%d") library(pacman); p_load(DT, ggplot2, rdd, ggthemes) ...

446 sym R (12622 sym/26 pcs) 2 img

A Method for Accounting for Change in Ordinal Variables

21.10.2021

Setup library(pacman); p_load(dplyr) Because the assumption of equal intervals rarely applies to ordinal-scaled data, it is frequently inappropriate to utilize change scores with them. Ferreira, Almeida & Luiz (2013) presented a simple, interpretable measure of ordinal change. Because methods are often not adopted unless code is made available, h...

2761 sym R (2554 sym/9 pcs)

Verbal IQ is Related to Tolerance in the GSS

09.11.2021

Packages and Data Description and Formatting library(pacman); p_load(haven, psych, dplyr, corrr, ggplot2, lavaan, sjmisc, specr, cowplot, ggpubr, pwr, ltm, polycor) Variables used: Verbal Ability wordsum: a 10-item verbal IQ measure (higher = smarter) Tolerance homosex: how wrong is homosexuality (positive) racmar: should racial intermarriage ...

4710 sym R (75731 sym/225 pcs) 32 img

Neuroticism and Gender Equality

17.11.2021

Setup The Gender Equality Paradox has also been dubbed the Nordic Paradox. library(remotes) remotes::install_github("Jo-Karl/ccpsyc") library(pacman); p_load(psych, lavaan, dplyr, ccpsyc, sjmisc, ggplot2, sandwich, lmtest, umx, tidyr) describe(IPIPA) ## Warning in FUN(newX[, i], ...): no non-missing arguments to min; returning Inf ## Warning in ...

9185 sym R (65250 sym/387 pcs) 10 img

dMACS_True

05.12.2021

Setup The Goal dMACS provides the correct magnitudes for bias due to non-invariance; dMACS_Signed provides the correct directions for the effects but its magnitudes are only correct in certain cases. Here, I provide a function that provides dMACS of the correct magnitude and direction, dubbed dMACS_True. Below, instead of writing “MACS” a bu...

3109 sym R (4183 sym/10 pcs)

Differences in the Relationships between Empowerment and Satisfaction in Minority and Majority Faculty

18.12.2021

Setup p_load(lavaan, dplyr, psych, janitor, sjmisc, semPlot) FITM <- c("chisq", "df", "nPar", "cfi", "rmsea", "rmsea.ci.lower", "rmsea.ci.upper") data$racedi <- rec(data$race_col, rec = "1 = 0; 2,3,4,5,6 = 1") #"White" and "non-White" data <- subset(data, racedi == 0 | racedi == 1) Cutoff p-Value NP <- function(N, S = 2){ NP = 1-pnorm(qn...

3609 sym R (45882 sym/92 pcs) 1 img