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
data { | |
int<lower = 1> nSubjects; | |
int nIIV; | |
} | |
parameters { | |
cholesky_factor_corr[nIIV] L; | |
matrix[nIIV, nSubjects] etaStd; | |
} |
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
#include <stan/math/prim/core.hpp> | |
#include <stan/math.hpp> | |
#include <gtest/gtest.h> | |
#include <algorithm> | |
#include <sstream> | |
#include <tuple> | |
#include <vector> | |
std::ostream* msgs = nullptr; |
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
bench | time | cpu | iters | type | test | |
---|---|---|---|---|---|---|
add_copy_bench/2_mean | 187 ns | 187 ns | 35 | mean | copy | |
add_copy_bench/2_median | 186 ns | 186 ns | 35 | median | copy | |
add_copy_bench/2_stddev | 3.10 ns | 3.09 ns | 35 | stddev | copy | |
add_copy_bench/4_mean | 335 ns | 334 ns | 35 | mean | copy | |
add_copy_bench/4_median | 333 ns | 333 ns | 35 | median | copy | |
add_copy_bench/4_stddev | 3.46 ns | 3.46 ns | 35 | stddev | copy | |
add_copy_bench/8_mean | 1159 ns | 1159 ns | 35 | mean | copy | |
add_copy_bench/8_median | 1156 ns | 1156 ns | 35 | median | copy | |
add_copy_bench/8_stddev | 9.47 ns | 9.47 ns | 35 | stddev | copy |
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
// Code generated by stanc acfb4612 | |
#include <stan/model/model_header.hpp> | |
namespace example_model_namespace { | |
template <typename T, typename S> | |
std::vector<T> resize_to_match__(std::vector<T> &dst, | |
const std::vector<S> &src) { | |
dst.resize(src.size()); | |
return dst; |
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
// Code generated by stanc acfb4612 | |
#include <stan/model/model_header.hpp> | |
namespace blah_model_namespace { | |
template <typename T, typename S> | |
std::vector<T> resize_to_match__(std::vector<T> &dst, | |
const std::vector<S> &src) { | |
dst.resize(src.size()); | |
return dst; |
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
test_x = runif(10000, min = 0, 1000) | |
test_x = test_x * 1e+10 | |
orig_signif = function(x, digits = 1) { | |
xx = abs(x); | |
return(trunc((10^((floor(log10(x)) * -1) + digits - 1)) * x)) | |
} | |
new_signif = function(x, digits = 1) { | |
xx = abs(x); |
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
// generated with brms 2.10.3 | |
functions { | |
} | |
data { | |
int<lower=1> N; // number of observations | |
vector[N] Y; // response variable | |
// data needed for ARMA correlations | |
int<lower=0> Kar; // AR order | |
int<lower=0> Kma; // MA order | |
// number of lags per observation |
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
// Code generated by Stan version 2.21.0 | |
#include <stan/model/model_header.hpp> | |
namespace test_mod1_model_namespace { | |
using std::istream; | |
using std::string; | |
using std::stringstream; | |
using std::vector; |
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
library(brms) | |
library(cmdstanr) | |
make_fake_df = function() { | |
N = 100000 | |
foo_groups = apply(combn(LETTERS, m = 3), 2, function(x) paste(x, collapse='')) | |
test_df = data.frame( | |
x1 = runif(N, -2, 2), | |
x2 = runif(N,-2 , 2), | |
x3 = runif(N, -2, 2), |
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
\documentclass[border=10pt]{article} | |
%%%< | |
\usepackage{verbatim} | |
%%%> | |
\usepackage{tikz} | |
\begin{document} | |
Given Data $x_i \in X$, $y_i \in Y$ and parameters $\alpha$, $\beta$ we can break the operations up into N groups (3 in example below). | |
\\ |