| algo.hhh.grid {surveillance} | R Documentation |
Tries multiple starting values in algo.hhh.
Starting values are provided in a matrix with gridSize rows, the
grid search is conducted until either all starting values are used or
a time limit maxTime is exceeded.
The result with the highest likelihood is returned.
algo.hhh.grid(disProgObj, control=list(linear=FALSE, nseason=0, period=52,
neighbours=FALSE, negbin=FALSE, lambda=TRUE), thetastartMatrix,
maxTime=1800, verbose=FALSE)
disProgObj |
object of class disProg |
control |
Control object:
|
thetastartMatrix |
matrix with initial values for all parameters specified in the control object as rows. |
verbose |
if true progress information is printed |
maxTime |
maximum of time (in seconds) to elapse until algorithm stopps. |
list |
|
M. Paul, L. Held
Held, L., Höhle, M., Hofmann, M. (2005). A statistical framework for the analysis of multivariate infectious disease surveillance counts. Statistical Modelling, 5, p. 187-199.
# monthly counts of menigococcal infections in France
data(meningo.age)
# specify model for algo.hhh.grid
model1 <- list(lambda=TRUE, linear=TRUE)
# create grid of inital values
grid1 <- create.grid(params = list(lambda=c(0.1,0.9,5), beta=c(-1,1,3)))
# try multiple starting values, print progress information
algo.hhh.grid(meningo.age, control=model1, thetastartMatrix=grid1,
verbose=TRUE)
# specify model
model2 <- list(lambda=TRUE, neighbours=TRUE, linear=TRUE, negbin=TRUE,
nseason=1, period=12)
grid2 <- create.grid(params = list(lambda=c(0.1,0.9,5), phi=c(0.1,0.9,5),
beta=c(0,0.5,2), psi=c(0.3,12,10), gammaDelta=c(-0.5,0.5,3),
nseason=1))
# run algo.hhh.grid, search time is limited to 60 sec
algo.hhh.grid(meningo.age, control=model2, thetastartMatrix=grid2,
maxTime=60)