I've deprecated this Gist and migrated the CER FAQ to my faculty webpage:
https://github.com/amyjko/faculty/blob/master/components/cer.js
Feel free to submit pull requests on that file to make additions or corrections.
library(tidyverse) | |
library(ggExtra) | |
library(mvtnorm) | |
# Generate MVN data | |
s <- matrix(c(4,2,2,3), ncol = 2) | |
s1 <- matrix(c(3, -0.6,-0.6, 1), ncol=2) | |
s2 <- matrix(c(2,-0.08,-0.08,1), ncol = 2) | |
m1 <- c(0, 0) | |
m2 <- c(-3, 4) |
I've deprecated this Gist and migrated the CER FAQ to my faculty webpage:
https://github.com/amyjko/faculty/blob/master/components/cer.js
Feel free to submit pull requests on that file to make additions or corrections.
extract.clmm <- function(model, include.thresholds = TRUE, include.aic = TRUE, | |
include.bic = TRUE, include.loglik = TRUE, oddsratios = TRUE, conf.level= 0.95, include.nobs = TRUE, ...) { | |
s <- summary(model, ...) | |
tab <- s$coefficients | |
thresh <- tab[rownames(tab) %in% names(s$alpha), ] | |
threshold.names <- rownames(thresh) | |
threshold.coef <- thresh[, 1] | |
threshold.se <- thresh[, 2] | |
threshold.pval <- thresh[, 4] |
ZIP,LAT,LNG | |
00601,18.180555, -66.749961 | |
00602,18.361945, -67.175597 | |
00603,18.455183, -67.119887 | |
00606,18.158345, -66.932911 | |
00610,18.295366, -67.125135 | |
00612,18.402253, -66.711397 | |
00616,18.420412, -66.671979 | |
00617,18.445147, -66.559696 | |
00622,17.991245, -67.153993 |