Skip to content

Commit a417cd9

Browse files
committed
minor bug fixes.
Former-commit-id: f0c4ddc [formerly f0c4ddc [formerly 53317f8]] Former-commit-id: 0211a78656a94a080a29570d43339887f954ab9a Former-commit-id: 9716b4c
1 parent a906ae5 commit a417cd9

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

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)