I hereby claim:
- I am stonegold546 on github.
- I am jamesuanhoro (https://keybase.io/jamesuanhoro) on keybase.
- I have a public key ASDQwPwPar3wn53oAgVAk6oGl6VZsS7Xlucm8AE_Rkgx3wo
To claim this, I am signing this object:
library(lavaan) | |
library(psych) | |
sim.fun <- function (lv, lambda, nrep = 2e3) { | |
np <- nrow(lv) | |
t(replicate(nrep, { | |
X <- lv %*% lambda + | |
matrix(rnorm(np * length(lambda), 0, sqrt(1 - lambda ^ 2)), np, byrow = TRUE) | |
# summary(cfa(paste("F =~", paste0("V", 1:length(lambda), collapse = " + ")), X, std.lv = TRUE)) | |
library(lavaan) | |
library(rstan) | |
library(rethinking) | |
library(loo) | |
options(mc.cores = parallel::detectCores()) | |
rstan_options(auto_write = TRUE) | |
dat <- dplyr::select(HolzingerSwineford1939, x1:x9) |
# require(lme4) | |
mymod <- function(data) { | |
result <- lme4::lmer(y ~ 1 + (1 | x), data = data, REML = FALSE) | |
sumy <- summary(result) | |
varb <- sumy$varcor$x[1] | |
varw <- sumy$sigma ^ 2 | |
icc <- varb / (varb + varw) | |
c(icc, varb, varw) | |
} | |
# mymod(data) |
get_gci_fcn <- function(mymeansqsvec, MC = 100000, B, L, R, alpha = 0.05) { | |
# Precondition: mymeansqsvec is a vector of mean squares from | |
# the ANOVA fit of a two-way crossed models. B>2 | |
# is the number of levels of the first factor and | |
# L>2 is the number of levels of the second factor and | |
# R>0 is the number of replicates per cell. A two-way | |
# balanced layout without interaction is assumed. | |
# MC is the number of Monte Carlo used to construct the | |
# GCI, with default one-hundred thousand. |
title Using our API: details at /api/v1/routes | |
note over API: LOGIN | |
note right of API: GET /api/v1/client_id | |
Dev->API: Request for Google OAuth Client ID | |
API->Dev: Returns Google OAuth Client ID as URL Dev can call | |
Dev->*Google: Request callback code from Google | |
Google-->Dev: Returns callback code | |
destroy Google | |
note right of API: GET /api/v1/use_callback_code |
I hereby claim:
To claim this, I am signing this object: