Skip to content

Commit

Permalink
fix names of Land U
Browse files Browse the repository at this point in the history
  • Loading branch information
g-rppl committed Jan 18, 2024
1 parent 7d0f804 commit 8c8eb8f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions R/mpfilter.R
Original file line number Diff line number Diff line change
Expand Up @@ -290,16 +290,16 @@ mpfilter <-
l_tau=c(Inf,Inf),
l_rho_o=7)

names(L)[c(1:2,6:7)] <- c("l_sigma", "l_sigma", "l_tau", "l_tau")
names(U)[c(1:2,6:7)] <- c("l_sigma", "l_sigma", "l_tau", "l_tau")

if(any(!is.null(control$lower))) {
L[which(names(L) %in% names(control$lower))] <- unlist(control$lower)
}
if(any(!is.null(control$upper))) {
U[which(names(U) %in% names(control$upper))] <- unlist(control$upper)
}

names(L)[c(1:2,6:7)] <- c("l_sigma", "l_sigma", "l_tau", "l_tau")
names(U)[c(1:2,6:7)] <- c("l_sigma", "l_sigma", "l_tau", "l_tau")

# Remove inactive parameters from bounds
L <- L[!names(L) %in% names(map)]
U <- U[!names(U) %in% names(map)]
Expand Down
6 changes: 3 additions & 3 deletions R/sfilter.R
Original file line number Diff line number Diff line change
Expand Up @@ -342,15 +342,15 @@ sfilter <-
l_tau=c(Inf,Inf),
l_rho_o=7)

names(L)[c(1:2,4:5,7:8)] <- rep(c("l_sigma", "l_D", "l_tau"), each = 2)
names(U)[c(1:2,4:5,7:8)] <- rep(c("l_sigma", "l_D", "l_tau"), each = 2)

if(any(!is.null(control$lower))) {
L[which(names(L) %in% names(control$lower))] <- unlist(control$lower)
}
if(any(!is.null(control$upper))) {
U[which(names(U) %in% names(control$upper))] <- unlist(control$upper)
}

names(L)[c(1:2,6:7)] <- c("l_sigma", "l_sigma", "l_tau", "l_tau")
names(U)[c(1:2,6:7)] <- c("l_sigma", "l_sigma", "l_tau", "l_tau")

# Remove inactive parameters from bounds
L <- L[!names(L) %in% names(map)]
Expand Down

0 comments on commit 8c8eb8f

Please sign in to comment.