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
| # Categorical missing data in Stan | |
| # Demonstrated with three categories | |
| # Code and ideas adapted from @rmcelreath | |
| # https://gist.github.com/rmcelreath/9406643583a8c99304e459e644762f82 | |
| # Code and ideas discussed with @dmontecino | |
| # https://gist.github.com/dmontecino/b804853e4b36a57990a7108a35201cf5 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| #!/usr/bin/env bash | |
| git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
| git fetch --all | |
| git pull --all |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| # "impute" missing binary predictor | |
| # really just marginalizes over missingness | |
| # imputed values produced in generated quantities | |
| N <- 1000 # number of cases | |
| N_miss <- 100 # number missing values | |
| x_baserate <- 0.25 # prob x==1 in total sample | |
| a <- 0 # intercept in y ~ N( a+b*x , 1 ) | |
| b <- 1 # slope in y ~ N( a+b*x , 1 ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.