Skip to content

Instantly share code, notes, and snippets.

Avatar

Sacha Epskamp SachaEpskamp

View GitHub Profile
View higherorder.R
library("lavaan")
library("psychonetrics")
library("dplyr")
# Generate data:
mod <- '
F1 =~ X1 + X2 + X3
F2 =~ X4 + X5 + X6
F3 =~ X7 + X8 + X9
G =~ F1 + F2 + F3
View RNM_example_bfi.R
library("psychonetrics")
library("psychTools")
library("dplyr")
data("bfi")
# Extraversion and Neuroticism items:
data <- bfi[,11:20]
# ggm model:
mod_ggm <- ggm(data, estimator = "FIML") %>%
View psychonetrics_multilevel_test.R
# FIML multilevel
# Model described in https://psyarxiv.com/8ha93/
# See also http://statmodel.com/bmuthen/articles/Article_055.pdf
# Load packages:
library("lavaan")
library("psychonetrics")
library("bootnet")
library("mvtnorm")
library("qgraph")
View APS.R
library("qgraph")
# https://twitter.com/EikoFried/status/1208502815099932685
# Symposia:
Symposia <- list(
# 1.
centrality = c("Eiko Fried", "Ciaran O'Driscoll", "Joshua Buckman", "Donald Robinaugh", "Teague Henry", "Laura Bringmann"),
computational = c("Julian Burger", "Donald Robinaugh", "Lucy Robinson", "Jonas Haslbeck", "Teague Henry", "Sacha Epskamp"),
View ggmModSelect.Rnw
\documentclass{article}
\usepackage[
paperwidth=27cm,paperheight=13cm,
margin=1cm,
]{geometry}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
View sparsityTest.R
library("bootnet")
library("mvtnorm")
library("qgraph")
# Sample size:
n <- 40000
# Generate 10-node chain graph with positive edges:
net <- genGGM(10, propPositive = 1, constant = 1.1)
View SEset2.R
library("SEset")
library("qgraph")
library("pcalg")
# For true DAG:
A <- matrix(c(
0,0.25,0.25,
0,0,0,
0,0,0
),3,3,byrow=TRUE)
View SEset1.R
library("SEset")
library("qgraph")
library("pcalg")
# For true DAG:
A <- matrix(c(
0,0,0,
0.25,0,0,
0,0.25,0
),3,3,byrow=TRUE)
View parSim_example_psychonetrics_2
library("parSim")
parSim(
### SIMULATION CONDITIONS
# Vary sample size:
sampleSize = c(250, 500, 1000),
# Vary missingness:
missing = c(0, 0.1, 0.25),
View parSim_example_psychonetrics_1.R
library("parSim")
parSim(
### SIMULATION CONDITIONS
# Vary sample size:
sampleSize = c(250, 500, 1000),
# Vary missingness:
missing = c(0, 0.1, 0.25),
You can’t perform that action at this time.