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(psychmeta) | |
ma_obj <- ma_r(rxyi = rxyi, n = n, rxx = rxxi, ryy = ryyi, | |
construct_x = x_name, construct_y = y_name, sample_id = sample_id, | |
moderators = moderator, data = data_r_meas_multi) | |
summary(ma_obj) | |
class(ma_obj) | |
inherits(ma_obj, "ma_psychmeta") | |
inherits(ma_obj, "ma_table") |
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
# Copyright (2021) Brenton M. Wiernik | |
# Licensed under GPL-3.0 | |
# | |
sim.rma.uni <- function(object, n.sims = object$k, sim.type = c("coef", "sample"), newdata = NULL, control = NULL, ...) { | |
sim.type <- match.arg(sim.type) | |
if (!inherits(object, "rma.uni")) | |
stop(mstyle$stop("Argument 'object' must be an object of class \"rma.uni\".")) | |
if (inherits(object, "robust.rma")) | |
stop(mstyle$stop("Method not available for objects of class \"robust.rma\".")) | |
if (inherits(object, "rma.ls")) |
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
.cmicalc <- function (df) { | |
cmi <- ifelse(df <= 1, NA, | |
exp(lgamma(df/2) - log(sqrt(df/2)) - lgamma((df - 1)/2)) | |
) | |
return(cmi) | |
} | |
smd_stats <- | |
function(diff = NULL, | |
se_diff = NULL, |
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
--- | |
references: | |
- id: 1917a | |
archive: 'Manuscripts and Archives, Yale University Library' | |
archive_location: 'Robert Mearns Yerkes Papers (Box 137, Folder 2292)' | |
archive-place: 'New Haven, CT' | |
issued: | |
- year: 1917 | |
- year: 1954 | |
circa: 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
--- | |
references: | |
- id: BalsamAffirmativecognitivebehavior2019 | |
accessed: | |
- year: 2019 | |
month: 10 | |
day: 17 | |
author: | |
- family: Balsam | |
given: Kimberly F. |
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
complete_list <- function(.list, .names) { | |
if (missing(.names)) return(.list) | |
.list[.names[! (.names %in% names(.list)) ]] <- NA | |
return(.list) | |
} | |
a <- list(b = 1, c = 2) | |
a <- complete_list(a, c("a", "b", "c")) | |
dplyr::coalesce(a$a, a$b, a$c, 0) |
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(tidyverse) | |
ind_data <- psych::bfi %>% | |
na.omit() %>% | |
filter(education %in% c(2, 4, 5)) %>% | |
select(A1:A5, education) %>% | |
group_by(education) %>% | |
slice(sample(1:n(), 40)) %>% | |
ungroup() %>% | |
rowid_to_column(".id") %>% |
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 draw samples from distributions implied by lm() models | |
## | |
## Arguments for simulate_model correspond to arguments in: | |
## a) stats::predict.lm(); | |
## b) stats::simulate(); | |
## c) nsamples is an alias for nsim; | |
## d) dist_type specifies the type of distribution to sample from | |
## 1) "ml"; from the maximum likelihood distribution; | |
## the distribution implied by estimated model parameters; | |
## (equivalent to stats::simulate()); |
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="in-text" version="1.0" demote-non-dropping-particle="display-and-sort" page-range-format="chicago"> | |
<info> | |
<title>Chicago Manual of Style 17th edition (author-date)</title> | |
<id>http://www.zotero.org/styles/chicago-author-date</id> | |
<link href="http://www.zotero.org/styles/chicago-author-date" rel="self"/> | |
<link href="http://www.chicagomanualofstyle.org/tools_citationguide.html" rel="documentation"/> | |
<author> | |
<name>Julian Onions</name> | |
<email>[email protected]</email> |
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 =====>> | |
set delimiter | |
<<===== DESCRIPTION =====<< | |
>>===== RESULT =====>> | |
<div class="csl-bib-body"> |
NewerOlder