Skip to content

Instantly share code, notes, and snippets.

View carlislerainey's full-sized avatar

Carlisle Rainey carlislerainey

View GitHub Profile
@carlislerainey
carlislerainey / poisson_mle_sims_bias_comp.R
Last active August 13, 2018 18:06 — forked from christophergandrud/poisson_mle_sims_bias_comp.R
Compare bias in Poisson MLE and various Sim methods (10 August)
library(tidyverse)
# set seed
#set.seed(4321)
# set simulation paramters
n <- 100 # sample size
x <- rnorm(n) # single explanatory variable
n_qi <- 100 # number of points at which to calculate the marginal effect
x0 <- seq(-3, 3, length.out = n_qi) # points at which to calculate the marginal effect