Skip to content

Instantly share code, notes, and snippets.

@dmi3kno
dmi3kno / Gamma_Exponential_Stan.R
Created May 30, 2021 17:39 — forked from mages/Gamma_Exponential_Stan.R
Gamma Exponential with Stan
library(rstan)
stanmodelcode <- "
data {
int<lower=0> N;
int<lower=0> y[N];
}
parameters {
real<lower=0.00001> Theta;
}
model {
library(tidyverse)
library(brms)
library(tidybayes)
mpg_model <- brm(
bf(hwy ~ 0 + drv),
data = mpg,
prior = c(
set_prior("normal(20, 3)", class = "b", lb = 0, ub = 40),
set_prior("student_t(3, 0, 10)", class = "sigma")
---
title: "Presentation Ninja"
subtitle: "⚔<br/>with xaringan"
author: "Yihui Xie"
date: "2016/12/12 (updated: `r Sys.Date()`)"
output:
xaringan::moon_reader:
lib_dir: libs
css:
- default