I hereby claim:
- I am khakieconomics on github.
- I am javage (https://keybase.io/javage) on keybase.
- I have a public key ASCOfa5tiUHOtFlCuiaEWO_BO1GQwq0-7ugZRerDYO_p7go
To claim this, I am signing this object:
| data { | |
| int N; // number of observations | |
| int T; // number of time periods | |
| int I; // number of groups | |
| int P; // number of controls | |
| int<lower = 1, upper = T> time[N]; // time index | |
| int<lower = 1, upper = I> group[N]; // group index | |
| vector[N] Y; | |
| matrix[N, P] X; // you should include group/time means in X | |
| } |
| functions { | |
| matrix make_pairwise_logit_mat(vector theta) { | |
| matrix[rows(theta), rows(theta)] out; | |
| for(r in 1:rows(out)) { | |
| for(c in 1:r) { | |
| if(r==c) { | |
| out[r, c] = 0; | |
| } else { | |
| out[r, c] = exp(theta[c])/(exp(theta[c]) + exp(theta[r])); |
| data { | |
| int N; // number of individuals | |
| int T; // number of time periods | |
| matrix[N, T] Y; // outcome matrix; missing entries set to -9.0 | |
| int K; // rank of matrix | |
| } | |
| parameters { | |
| matrix[N, K] M; // individual loadings | |
| matrix[T, K] U; // time factors | |
| real<lower = 0> sigma; // error scale |
| data { | |
| int N; | |
| int N_neg; | |
| int N_pos; | |
| int P; | |
| matrix[N, P] X; | |
| matrix[N, 3] Y_raw; // first column is 0s and 1s | |
| int pos_neg[N_neg]; | |
| int pos_pos[N_pos]; | |
| } |
| # A simple script to grab github commits for a list of users and plot | |
| # Group average commits per day for two groups | |
| # To use this script, you'll need to set up a yaml file with credentials | |
| # for github, and set up a google sheet with columns `Github handle` and | |
| #`Attended` (with values "Yes" or "No") | |
| # Author: Jim Savage, Schmidt Futures | |
| # Load libraries | |
| library(tidyverse); library(httr); library(yaml);library(jsonlite); |
I hereby claim:
To claim this, I am signing this object: