Skip to content

Commit f0c4ddc

Browse files
committed
minor bug fixes.
Former-commit-id: 53317f8
1 parent 3d9ab58 commit f0c4ddc

4 files changed

Lines changed: 4 additions & 2 deletions

File tree

r/example1-lgss.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ plot(
119119
col = "#7570B3",
120120
type = "l",
121121
xlab = "time",
122-
ylab = "difference in state estimate",
122+
ylab = "error in state estimate",
123123
ylim = c(-0.1, 0.1),
124124
bty = "n"
125125
)

r/figures/example1-lgss.pdf

-2.42 KB
Binary file not shown.

r/helpers/dataGeneration.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,5 @@ generateData <- function(theta, T, initialState) {
6060
y[t] <- x[t] + sigmae * rnorm(1)
6161
}
6262

63-
list(x = x, y = y)
63+
list(x = x, y = y)
64+
}

r/helpers/parameterEstimation.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ particleMetropolisHastingsSVmodel <- function(y, initialTheta, noParticles, noIt
211211

212212
# Always reject if parameter results in an unstable system
213213
acceptProbability <- acceptProbability * (abs(thetaProposed[k, 2]) < 1.0)
214+
acceptProbability <- acceptProbability * (thetaProposed[k, 3] > 0.0)
214215

215216
# Generate uniform random variable in U[0,1]
216217
uniformRandomVariable <- runif(1)

0 commit comments

Comments
 (0)