Created
July 15, 2024 16:04
-
-
Save WardBrian/93d12876923790f23d9c5cb481e8cd34 to your computer and use it in GitHub Desktop.
Linear Regression
This file contains 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
{ | |
"N": 10, | |
"x": [ | |
1, | |
2, | |
3, | |
4, | |
5, | |
6, | |
7, | |
8, | |
9, | |
10 | |
], | |
"y": [ | |
1.175246231294085, | |
2.407986514262124, | |
3.722795906507695, | |
4.913215145535075, | |
6.086548493077272, | |
7.278023025499204, | |
8.587414785721538, | |
9.990151691417916, | |
11.251678394115302, | |
12.406899413685272 | |
] | |
} |
This file contains 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=0> N; | |
vector[N] x; | |
vector[N] y; | |
} | |
parameters { | |
real alpha; | |
real beta; | |
real<lower=0> sigma; | |
} | |
model { | |
y ~ normal(alpha + beta * x, sigma); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment