This file contains hidden or 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
# Code to create a monthly, directed dyadic panel of | |
# Militarized Interstate Dispute data, with directional initiation | |
# uses cshapes to create monthly list of all dyads, then uses data.table | |
# to transform MIDS to a monthly panel and then merge | |
# Code by Adam Lauretig, 2019 | |
# website: adamlauretig.github.io | |
rm(list = ls()) | |
options(stringsAsFactors = FALSE) |
This file contains hidden or 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
--- | |
title: "Using Gensim in R" | |
author: "Adam Lauretig" | |
date: "3/17/2018" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
``` |
This file contains hidden or 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
data { | |
int N; | |
int PX; // dimension of exogenous covariates | |
int PN; // dimension of endogenous covariates | |
int PZ; // dimension of instruments | |
matrix[N, PX] X_exog; // exogenous covariates | |
matrix[N, PN] X_endog; // engogenous covariates | |
matrix[N, PZ] Z; // instruments | |
vector[N] Y_outcome; // outcome variable | |
int<lower=0,upper=1> run_estimation; // simulate (0) or estimate (1) |