Skip to content

Commit

Permalink
Update elastic_changepoint.R
Browse files Browse the repository at this point in the history
  • Loading branch information
jdtuck committed May 28, 2024
1 parent 7265ffc commit 131b27c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/elastic_changepoint.R
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ elastic_ph_change_ff <- function(f, time, d = 1000, h = 0, smooth_data=FALSE, sp
Sn <- (1:N1)
Sn[1] <- 0
for (j in (2:N1)) {
Sn[j] <- 1/M * pvecnorm(1/sqrt(N1)*(mu[,j-1]-(j/N1)*mu[,N1]))^2
Sn[j] <- 1/M * pvecnorm(1/sqrt(N1)*(mu[,j]-(j/N1)*mu[,N1]))^2
}
k.star <- min(which(Sn == max(Sn)))
Tn <- max(Sn)
Expand Down

0 comments on commit 131b27c

Please sign in to comment.