Skip to content

Commit

Permalink
Switch shape parameters in beta knot distribution
Browse files Browse the repository at this point in the history
This is more intuitive as more knots will end up in the lower tail if mu is decreased.
  • Loading branch information
BerriJ committed Mar 2, 2023
1 parent 48fcb4b commit fec3dfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/splines.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pgbeta <- function(x, mu = .5, sig = 1, nonc = 0) {
a <- mu * sig * 2
b <- (1 - mu) * sig * 2
a <- (1 - mu) * sig * 2
b <- mu * sig * 2
c <- abs(nonc)
seq_beta <- pbeta(x, a, b, c)
if (nonc < 0) seq_beta <- rev(1 - seq_beta)
Expand Down

0 comments on commit fec3dfa

Please sign in to comment.