[SOLVED] Matrix inversion error???

Any question regarding the Interpolation method using Kriging

[SOLVED] Matrix inversion error???

Postby Bergenkarl » Mon Feb 02, 2015 10:54 am

Dear Geostats-Team,

first of all I want to say again how great the course in December was, I had a wonderful time and also learned a lot :)

My Problem:
I am trying to apply the Kriging on maturitystages, to connect a surveystation to a probability of mature fish.
I fixed the Script during the course, and it works with the data set I created it with, but when I try to apply my new set with the maturity probabilities and I perform kriging i get that error message:

> # Perform ordinary kriging (no mean as we are perfomring OK)
> grid.db <- kriging(dbin=data.db,dbout=grid.db,model=vg.mod,neigh=neiu,
+ uc=c("1"),mean=NA,calcul="point",radix="OK")
Error in matrix inversion (rank=1) : Pivot #16 is null
> grid.db

I realize it must have something to do with my new dataset, or my grid or something like that, but I can not find the mistake.
Do you guys have an idea where that error is connected to?

All the best from sunny Bergen
Karl
Bergenkarl
 
Posts: 4
Joined: Mon Feb 02, 2015 10:49 am

Re: Matrix inversion error???

Postby Didier Renard » Tue Feb 03, 2015 11:19 pm

Hi Karl

I imagine your problem is due to the presence of duplicates.
There should be some in the 16 first values of your file (Pivot #16 is null)
To check duplicates (according to the coordinates "x*"), simply type:

db.print(data.db,flag.stats=TRUE)

Hope this will help
Didier Renard
 
Posts: 337
Joined: Thu Sep 20, 2012 4:22 pm

Re: Matrix inversion error???

Postby Bergenkarl » Wed Feb 04, 2015 10:13 am

Hi Didier,

unfortunately I could not solve the Problem using your command. I can neither find a duplicate, nor does it give me any new Information about what could be wrong.

> db.print(data.db,flag.stats=TRUE)

Data Base Characteristics
=========================

Data Base Summary
-----------------
File is organized as a set of isolated points
Space dimension = 2
Number of fields = 7
Maximum Number of attributes = 7
Total number of samples = 54
Number of active samples = 54

Data Base Statistics
--------------------
1 - Locator Variable NA
Nb of data = 54
Nb of active values = 54
Minimum value = 1.000
Maximum value = 54.000
Mean value = 27.500
Standard Deviation = 15.586
Variance = 242.917
2 - Locator Variable NA
Nb of data = 54
Nb of active values = 54
Minimum value = 2010.000
Maximum value = 2013.000
Mean value = 2012.222
Standard Deviation = 0.533
Variance = 0.284
3 - Locator Variable NA
Nb of data = 54
Nb of active values = 54
Minimum value = 23365.000
Maximum value = 24396.000
Mean value = 24277.833
Standard Deviation = 162.528
Variance = 26415.472
4 - Locator Variable x2
Nb of data = 54
Nb of active values = 54
Minimum value = 57.033
Maximum value = 61.602
Mean value = 59.075
Standard Deviation = 1.261
Variance = 1.590
5 - Locator Variable x1
Nb of data = 54
Nb of active values = 54
Minimum value = -0.590
Maximum value = 6.172
Mean value = 2.558
Standard Deviation = 1.697
Variance = 2.879
6 - Locator Variable z1
Nb of data = 54
Nb of active values = 54
Minimum value = 0.000
Maximum value = 1.000
Mean value = 0.102
Standard Deviation = 0.251
Variance = 0.063
7 - Locator Variable sel
Nb of data = 54
Nb of active values = 54
Minimum value = 1.000
Maximum value = 1.000
Mean value = 1.000
Standard Deviation = 0.000
Variance = 0.000

Variables
---------
Field = 1 - Name = rank - Locator = rank
Field = 2 - Name = year - Locator = NA
Field = 3 - Name = serienr - Locator = NA
Field = 4 - Name = lat - Locator = x2
Field = 5 - Name = lon - Locator = x1
Field = 6 - Name = Prob - Locator = z1
Field = 7 - Name = sel - Locator = sel


That's what comes out. I also attach the datafile, it is not large, so I hope it is no problem.
Can you find the error?
Bergenkarl
 
Posts: 4
Joined: Mon Feb 02, 2015 10:49 am

Re: Matrix inversion error???

Postby Bergenkarl » Wed Feb 04, 2015 10:18 am

I could not attach the .txt file, that might help anyway: ?

year serienr lat lon Prob
1 2010 23365 59.76167 1.9700000 0.33300000
2 2012 24302 59.29333 3.1333333 0.00000000
3 2012 24303 59.27833 2.3250000 0.00000000
4 2012 24306 59.76000 -0.4100000 0.00000000
5 2012 24307 59.73167 0.6633333 0.00000000
6 2012 24308 58.75333 -0.5900000 0.00000000
7 2012 24309 58.75167 0.5150000 0.00000000
8 2012 24310 57.24500 0.4833333 0.00000000
9 2012 24311 57.21167 1.4416667 0.00000000
10 2012 24330 57.61000 3.5250000 0.00000000
11 2012 24335 57.74667 5.1650000 0.00000000
12 2012 24338 58.18333 1.4850000 0.20000000
13 2012 24342 58.08500 2.5050000 0.00000000
14 2012 24343 58.23333 3.3816667 0.00000000
15 2012 24344 58.22333 4.3400000 0.00000000
16 2012 24350 58.18333 1.4850000 0.72727273
Bergenkarl
 
Posts: 4
Joined: Mon Feb 02, 2015 10:49 am

Re: Matrix inversion error???

Postby Bergenkarl » Wed Feb 04, 2015 10:54 am

I fixxed it!!!!!!!!!!!!!!!!!! :)
There was a duplicate in my coordinates, found it now.
THanks a lot Didier.
Bergenkarl
 
Posts: 4
Joined: Mon Feb 02, 2015 10:49 am


Return to Kriging

Who is online

Users browsing this forum: No registered users and 3 guests

cron