search for: buildfun

Displaying 3 results from an estimated 3 matches for "buildfun".

Did you mean: buildfoo
2014 Jan 08
0
Strange behaviour of `dlm` package
...0736, 25308044, 25021560, 25724331, 25990336, 26602038, 27292250, 28891954, 29659700, 31533579, 32513666, 33628559, 34494451)) plot(hotann, ylab="Annual hotel bookings") # Analysis with log data tsdata <- log(hotann) buildfun <- function (x) { dlmModPoly(order = 2, dV = exp(x[1]), dW = c(0,exp(x[2]))) } fit <- dlmMLE(y=tsdata, parm=c(0,0), build=buildfun) # Warning: a numerically singular 'V' has been slightly perturbed to make it nonsingular fit$conv dlmTsdata <- buildfun(fit$par) tsdataFilter <...
2009 Mar 11
1
Forecasting with dlm
...ave a problem trying to forecast using the dlm package, can anyone offer any advise? I setup my problem as follows, (following the manual as much as possible) data for example to run code CostUSD <- c(27.24031,32.97051, 38.72474, 22.78394, 28.58938, 49.85973, 42.93949, 35.92468) library(dlm) buildFun <- function(x) { dlmModPoly(1, dV = exp(x[1]), dW = exp(x[2])) } fit <- dlmMLE(CostUSD, parm = c(0,0), build = buildFun) fit$conv dlmCostUSD <- buildFun(fit$par) V(dlmCostUSD) W(dlmCostUSD) #For comparison StructTS(CostUSD, "level") CostUSDFilt <- dlmFilter(CostUSD, dlmCostUS...
2011 Jun 07
2
Setting up a State Space Model in dlm
This question pertains to setting up a model in the package "dlm" (dynamic linear models, http://cran.r-project.org/web/packages/dlm/index.html I have read both the vignette and?"An R Package for Dynamic Linear Models" (http://www.jstatsoft.org/v36/i12/paper), both of which are very helpful. There is also some discussion at