Skip to content

Commit

Permalink
added condition in spinar_boot
Browse files Browse the repository at this point in the history
  • Loading branch information
MFaymon committed Apr 2, 2024
1 parent 88e4ddb commit 54a303a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/spinar_boot.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ spinar_boot <- function(x, p, B, setting, type = "mom", distr = "poi", M = 100,
bs$bs_ci_percentile[2,i] <- srt[B*(1-level/2)]
} else{
K <- floor((B+1)*level/2)
if(K == 0){K <- 1}
bs$bs_ci_percentile[1,i] <- srt[K]
bs$bs_ci_percentile[2,i] <- srt[B+1-K]
}
Expand All @@ -153,6 +154,7 @@ spinar_boot <- function(x, p, B, setting, type = "mom", distr = "poi", M = 100,
bs$bs_ci_hall[2,i] <- parameters[i] - srt[B*level/2]
} else{
K <- floor((B+1)*level/2)
if(K == 0){K <- 1}
bs$bs_ci_hall[1,i] <- parameters[i] - srt[B+1-K]
bs$bs_ci_hall[2,i] <- parameters[i] - srt[K]
}
Expand Down

0 comments on commit 54a303a

Please sign in to comment.