Skip to content
View statwonk's full-sized avatar
🏠
Working from home
🏠
Working from home

Block or report statwonk

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse

Pinned Loading

  1. A visualization of the beta distribu... A visualization of the beta distribution.
    1
    library(tidyverse)
    2
    plot.new()
    3
    par(bg = "black")
    4
    plot(density(rbeta(1e6, 50, 50)), col = "pink3", lwd = 1, ylim = c(0, 8),
    5
         xlab = "", ylab = "", main = "Beta distribution", axes = FALSE,
  2. A comparison of std.errors of the tr... A comparison of std.errors of the treatment effect from an additive DGP experiment where a pre-treatment variable is interacted maximally, only additive no interaction, or unadjusted for.
    1
    library(tidyverse)
    2
    library(lme4)
    3
    library(broom)
    4
    
                  
    5
    N <- 1e4
  3. Time to 10% ending / converting / fa... Time to 10% ending / converting / failure.
    1
    library(tidyverse)
    2
    library(survival)
    3
    
                  
    4
    rweibull_cens <- function(n, shape, scale) {
    5
      # http://statwonk.com/weibull.html
  4. experimentr experimentr Public

    A place for experiment simulations

    R

  5. openNHTSA openNHTSA Public

    An R wrapper for the U.S. Department of Transportation National Highway Traffic Safety Administration's API.

    R 20 2

  6. Risk adds up. This code piece answer... Risk adds up. This code piece answers, "how quickly?" https://twitter.com/statwonk/status/1160542394544267265
    1
    library(tidyverse)
    2
    expand.grid(
    3
      risk = seq(0.001, 0.02, 0.001),
    4
      units_of_exposure = seq_len(24*7)
    5
    ) %>% as_tibble() %>%