Skip to content

Instantly share code, notes, and snippets.

View vincentarelbundock's full-sized avatar

Vincent Arel-Bundock vincentarelbundock

View GitHub Profile
@vincentarelbundock
vincentarelbundock / ex_arma2.ipynb
Created August 26, 2012 23:38
Statsmodels example: Autoregressive Moving Average (ARMA) Model
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vincentarelbundock
vincentarelbundock / ex_dates.ipynb
Created August 26, 2012 23:38
Statsmodels example: Using dates with timeseries models
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vincentarelbundock
vincentarelbundock / example_getting_started.ipynb
Created August 27, 2012 02:00
Statsmodels example: Getting started
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vincentarelbundock
vincentarelbundock / rr.ipynb
Last active May 5, 2016 21:35
Reinhart-Rogoff replication
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 27 columns, instead of 15. in line 6.
"","Country","Year","Debt","RGDP","GDP","dRGDP","GDPI","GDP1","GDP2","RGDP1","RGDP2","GDPI1","GDPI2","Infl","Debt1","Debt2","Debtalt","GDP2alt","GDPalt","RGDP2alt","debtgdp","GDP3","GNI","lRGDP","lRGDP1","lRGDP2"
"1","Australia",1946,5588.8,NA,NA,-3.55795148247978,NA,2935,NA,49290.528,NA,NA,NA,3.79658,NA,NA,NA,NA,NA,NA,190.419080068143,NA,NA,NA,51108.96,NA
"2","Australia",1947,5534.2,NA,NA,2.45947456679709,NA,3121,NA,50502.816,NA,NA,NA,6.80795,NA,NA,NA,NA,NA,NA,177.321371355335,NA,NA,NA,49290.528,NA
"3","Australia",1948,5580.4,NA,NA,6.43753409710857,NA,3747,NA,53753.952,NA,NA,NA,10.0884,NA,NA,NA,NA,NA,NA,148.929810515079,NA,NA,NA,50502.816,NA
"4","Australia",1949,5656,NA,NA,6.61199384930806,NA,4324,4495,57308.16,NA,NA,NA,7.45671,NA,NA,NA,NA,NA,NA,125.828698553949,NA,NA,NA,53753.952,NA
"5","Australia",1950,5818.8,NA,NA,6.92020124184758,NA,5099,5299,61274,NA,NA,NA,7.85522,NA,NA,NA,NA,NA,NA,109.809397999623,NA,NA,NA,57308.16,NA
"6","Australia",1951,6121,NA,NA,4.27261154812808,NA,6773,7028,63892,NA,NA,NA,21.87614

These packages were checked are are compatible with stats::nobs:

  • aer
  • plm
  • betareg
  • gam
  • gamlss
  • geefit
  • glmnet
  • lme4
✔ | OK F W S | Context
⠏ | 0 | test-aaa-documentation-helper
⠋ | 0 1 | test-aaa-documentation-helper
✔ | 0 1 | test-aaa-documentation-helper
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
test-aaa-documentation-helper.R:3: skip: (unknown)
documentation helper tests not yet written
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
library(tidyverse)
example <- tibble(id = 1:500,
A = sample(TRUE:FALSE, 500, replace = TRUE),
B = sample(TRUE:FALSE, 500, replace = TRUE),
C = sample(TRUE:FALSE, 500, replace = TRUE),
D = sample(TRUE:FALSE, 500, replace = TRUE),
E = sample(TRUE:FALSE, 500, replace = TRUE),
F = sample(TRUE:FALSE, 500, replace = TRUE))
library(gghighlight)
library(tidyverse)
# load data
raw <- read_csv('https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2020/2020-03-03/game_goals.csv')
# 8 best scorers (there are 8 colors in scale_color_brewer Dark2)
best <- raw %>%
group_by(player) %>%
summarize(goals = sum(goals)) %>%