perform loglik.GRF function but system is computationally singular

25 Views Asked by At
summary(elev)
dat.geo=as.geodata(elev)
res.geo=variog(dat.geo, max.dist = 3000, breaks = seq(0,3000,by=30))
res.fit2 <- variofit(res.geo, cov.model = 'gaussian')
llgrf2=loglik.GRF(dat.geo,obj.model=res.fit2)

My data is elev.

summary(elev)
       X             Y            elev      
 Min.   :  0   Min.   :  0   Min.   :340.2  
 1st Qu.:175   1st Qu.:125   1st Qu.:344.7  
 Median :350   Median :250   Median :351.3  
 Mean   :350   Mean   :250   Mean   :352.4  
 3rd Qu.:525   3rd Qu.:375   3rd Qu.:360.2  
 Max.   :700   Max.   :500   Max.   :367.8  

I tied multiple covariance models to determine the best fit model, but when I use gaussian models, and run the code:

llgrf2=loglik.GRF(dat.geo,obj.model=res.fit2)

R always showed:

trying another decomposition (svd)
Error in solve.default(V$varcov, xmat[[i]]) : 
  system is computationally singular: reciprocal condition number = 4.58279e-22

how should I solve this problem?

0

There are 0 best solutions below