Revision e2adabe0ed1038568742fa7fa1af105f94524834 authored by Mitzi Morris on 04 May 2020, 00:15:30 UTC, committed by Mitzi Morris on 04 May 2020, 00:15:30 UTC
1 parent c26e0c2
Raw File
golf1.stan
data {
  int J;
  int n[J];
  vector[J] x;
  int y[J];
  real r;
  real R;
}
transformed data {
  vector[J] threshold_angle = asin((R-r) ./ x);
}
parameters {
  real<lower=0> sigma;
}
model {
  vector[J] p = 2*Phi(threshold_angle / sigma) - 1;
  y ~ binomial(n, p);
}
generated quantities {
  real sigma_degrees = (180/pi())*sigma;
}

back to top