This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
# Function: coef_cov | |
# Author: Brenton M. Wiernik | |
# Date: 2020-01-27 | |
# Version: 1.0 | |
# | |
# Computes univariate linear regresssion models, | |
# predicting each response variable [`.y`] with each | |
# predictor variable [`.x`]. Returns the coefficients | |
# and their variance-covariance matrix. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Format the lower triangle of a matrix for printing | |
#' | |
#' @param x A matrix (e.g., a correlation matrix). | |
#' @param diag Either a logical value indicating whether to print the diagonal of the matrix (`TRUE`) or not (`FALSE`) or a vector of values to place on the diagonal (e.g., variable reliabilities). | |
#' @param format_num Logical. Should the `format_num()` function from the `psychmeta` package be used to format numbers? | |
#' @param ... Arguments passed to `psychmeta::format_num()`. | |
#' | |
#' @return | |
#' @export | |
#' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(dplyr) | |
library(ggplot2) | |
library(ggridges) | |
dat <- select(psych::bfi, age, education, gender) %>% | |
mutate(education = as.factor(education), | |
gender = as.factor(gender), | |
gender_edu = paste(education, gender)) %>% | |
na.omit() | |
ggplot(dat, aes(x = age, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Script to meta-analyze results of lavaan sem models | |
# | |
# Author: Brenton M. Wiernik | |
# Date: 2020-04-24 | |
# License: CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/) | |
# | |
# This script will meta-analyze the results of lavaan sem models. It assumes | |
# that the exact same lavaan model is specified for each sample and is | |
# not robust to differences in model specfications.# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{"id":"BoscoCorrelationaleffectsize2015","abstract":"Effect size information is essential for the scientific enterprise and plays an increasingly central role in the scientific process. We extracted 147,328 correlations and developed a hierarchical taxonomy of variables reported in Journal of Applied Psychology and Personnel Psychology from 1980 to 2010 to produce empirical effect size benchmarks at the omnibus level, for 20 common research domains, and for an even finer grained level of generality. Results indicate that the usual interpretation and classification of effect sizes as small, medium, and large bear almost no resemblance to findings in the field, because distributions of effect sizes exhibit tertile partitions at values approximately one-half to one-third those intuited by Cohen (1988). Our results offer information that can be used for research planning and design purposes, such as producing better informed non-nil hypotheses and estimating statistical power and planning sample size accordin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Functions to format numbers and estimates with confidence intervals in an APA-like format | |
' | |
' Author: Brenton M. Wiernik | |
' Date: 2020-05-12 | |
' | |
' License: CC0 | |
' | |
' Usage examples: | |
' Single number: | |
' =apanum(value, lead_zero, pos_sign, neg_sign, big_sep) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="never" page-range-format="expanded"> | |
<info> | |
<title>American Psychological Association 7th edition (full note, annotations)</title> | |
<title-short>APA (full note, annote)</title-short> | |
<summary>APA style, with citations formatted as full notes and standalone annotations entered in the `annote` field of patent items.</summary> | |
<id>http://www.zotero.org/styles/apa-fullnote-annotations</id> | |
<link href="https://raw.githubusercontent.com/bwiernik/zotero-tools/master/apa-fullnote-annotations.csl" rel="self"/> | |
<link href="http://www.zotero.org/styles/apa" rel="template"/> | |
<link href="https://apastyle.apa.org/style-grammar-guidelines/references/examples" rel="documentation"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alpha_stratified <- function(x, a, na.rm = TRUE) { | |
v <- diag(var(x, na.rm = na.rm)) | |
vt <- sum(var(x, na.rm = na.rm)) | |
ev <- sum((1 - a) * v) | |
return(list(strat.alpha = c(1 - ev/vt), scores = rowMeans(x, na.rm = TRUE))) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alpha_stratified <- function(x, a, na.rm = TRUE) { | |
v <- diag(var(x, na.rm = na.rm)) | |
vt <- sum(var(x, na.rm = na.rm)) | |
ev <- sum((1 - a) * v) | |
return(list(strat.alpha = c(1 - ev/vt), scores = rowMeans(x, na.rm = TRUE))) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>===== MODE =====>> | |
bibliography | |
<<===== MODE =====<< | |
>>===== DESCRIPTION =====>> | |
limit-day-ordinals-to-day-1 with date ranges | |
<<===== DESCRIPTION =====<< | |
>>===== RESULT =====>> | |
<div class="csl-bib-body"> |