[R-sig-Geo] SpatioTemporal package error

frankma md.franklin at gmail.com
Sun Sep 14 16:58:37 CEST 2014


Dear all,

I'm using the SpatioTemporal package
(http://cran.r-project.org/web/packages/SpatioTemporal/vignettes/ST_tutorial.pdf)
which is fantastic for spatio-temporal analysis however I've come across
hurdle that I cannot get over at the moment. Any help that anyone may be
able to give would be greatly appreciated.

I am afraid that my ignorance is likely causing a simple error, however, I
have not been able to resolve it.

Whilst estimating parameters I use:

model.dim <- loglikeSTdim(mesa.model)
str(model.dim) 

and return:

List of 12
 $ T              : int 48
 $ m              : int 2
 $ n              : int 26
 $ n.obs          : int 26
 $ p              : Named int [1:2] 4 2
  ..- attr(*, "names")= chr [1:2] "const" "V1"
 $ L              : int 1
 $ npars.beta.covf: Named int [1:2] 2 2
  ..- attr(*, "names")= chr [1:2] "exp" "exp"
 $ npars.beta.tot : Named int [1:2] 2 2
  ..- attr(*, "names")= chr [1:2] "exp" "exp"
 $ npars.nu.covf  : int 2
 $ npars.nu.tot   : int 3
 $ nparam.cov     : int 7
 $ nparam         : int 14


Then attempt to set up the model using these starting values (I have tried
countless others):

x.init <- cbind(c( rep(2, model.dim$nparam.cov-1), 2),c( rep(c(1,-2),
model.dim$m+1),1))

rownames(x.init) <- loglikeSTnames(mesa.model, all=FALSE)

est.mesa.model <- estimate(mesa.model, x.init,type="p", hessian.all=TRUE)
Optimisation using starting value 1/2
N = 7, M = 5 machine precision = 2.22045e-16
At X0, 0 variables are exactly at the bounds
At iterate     0  f=       1764.7  |proj g|=           17
At iterate    10  f =      -1868.3  |proj g|=        0.8506

iterations 13
function evaluations 20
segments explored during Cauchy searches 17
BFGS updates skipped 0
active bounds at final generalized Cauchy point 0
norm of the final projected gradient 0.0222348
final function value -1868.35

F = -1868.35
final  value -1868.352505 
converged

Error in diag(solve(res[[i]]$hessian)) : 
  error in evaluating the argument 'x' in selecting a method for function
'diag': Error in solve.default(res[[i]]$hessian) : 
  Lapack routine dgesv: system is exactly singular: U[1,1] = 0

The error above seems simple but I can't figure out how it occurs. Any help
you can give would be greatly appreciated.

Kind regards,

Matthew Franklin
University of Sheffield



-----
Matthew Franklin
School of Mathematics and Statistics
University of Sheffield
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/SpatioTemporal-package-error-tp7587127.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list