[R-sig-Geo] Fw : glsm.krige in geoRglm

Lho Lho manguefleur at yahoo.fr
Mon Jun 28 13:00:42 CEST 2010


Dear Paulo Ribeiro,

Sorry to send you again my previous e-mail. I am keen to understand why I am not able to use krige.glsm() with my rectangular grid. 

I hope that I am not disturbing you
Best regards,

Hocine
PhD Student UCC
Cork, Ireland

--- En date de : Mer 16.6.10, Lho Lho <manguefleur at yahoo.fr> a écrit :

> De: Lho Lho <manguefleur at yahoo.fr>
> Objet: glsm.krige in geoRglm
> À: "Paulo J Ribeiro Jr" <paulojus at c3sl.ufpr.br>
> Date: Mercredi 16 juin 2010, 11h22
> Dear Paulo Ribeiro 
> 
> Concerning the function krige.glsm(), I copied and past the
> example code you have in geoRglm package for binomial data
> (b50). 
> 
> The following code (from the package) is:
> 
> test2 <- glsm.krige(outmcmc.5,
> locations=matrix(c(0.15,0.15,0.005,0.05),2,2)) 
> 
> My question is:
> 
> Why when I try to put a rectangular grid in the locations
> argument above (instead of your matrix) 
> 
> rectangleb50.grid<-pred_grid(b50$coords[,1:2], by=0.3)
> 
> test2 <- glsm.krige(outmcmc.5,
> locations=rectangleb50.grid)
> 
> I have these 50 warnings() from R:
> 
> "In asympvar(kpl.result$predict, messages = FALSE) :
>   value of argument lag.max is not suffiently long"
> 
> Actually, I am working with counts data and I can perform
> glsm.krige only with locations=geodata$coords[,1:2].
> 
> If I try to put my rectangular.grid (which I built
> according to my data) in the locations argument I have the
> same warning messages.
> 
> My purpose is to display a image() using the glsm.krige
> output
> 
> Please, would you like to provide me an explanation?
> 
> Best regards
> 
> lho
> 
> 
> 
> 
> 
> 
>   
> 
> --- En date de : Lun 24.5.10, Lho Lho <manguefleur at yahoo.fr>
> a écrit :
> 
> > De: Lho Lho <manguefleur at yahoo.fr>
> > Objet: Re: Help with proflik() 2
> > À: "Paulo J Ribeiro Jr" <paulojus at c3sl.ufpr.br>
> > Date: Lundi 24 mai 2010, 17h18
> > Hi Paulo!
> > 
> > Thank you for your help  and sorry for the delay of
> my
> > answer I was away from my office.
> > 
> > It is still not working neither (*100) nor (*1000).
> > 
> > However, I tried in the likfit() function to choose
> > trend="1st" instead of trend= "2nd" and then, the
> proflik()
> > function worked.
> > 
> > I hope that the problem raised here is only due to
> me.
> > 
> > Actually, the quadratic trend surface (trend="2nd")
> makes
> > the data "bell" shaped according to the
> plot.geodata()
> > display.
> > Then, the geostatistical results I could draw from it
> could
> > be of interest if  compared with geoRglm results
> > (provided I assume that my burrows counts is poisson
> > distributed with units.m="m2").
> > 
> > I am going to try again with an other set of data (and
> I
> > cross my finger!!)
> > 
> > Please, let me know if you find out a solution!!!
> > 
> > Hocine
> > 
> > 
> >     
> > 
> > 
> > 
> > 
> > --- En date de : Dim 23.5.10, Paulo J Ribeiro Jr
> <paulojus at c3sl.ufpr.br>
> > a écrit :
> > 
> > > De: Paulo J Ribeiro Jr <paulojus at c3sl.ufpr.br>
> > > Objet: Re: Help with proflik()
> > > À: "Lho Lho" <manguefleur at yahoo.fr>
> > > Date: Dimanche 23 mai 2010, 21h04
> > > Hi 
> > > 
> > > Yhanks for reporting and sending detailed
> > information.
> > > I have not yet inspected/run the files and
> commands
> > > but I suspect that the probelem may be due to
> > numerical
> > > instability
> > > due to the different orders of magnitude between
> your
> > phi
> > > (range)
> > > parameters and the others.
> > > 
> > > As a quick try you could multiply all the
> coordinates
> > by a
> > > constant (100
> > > or 1000), changind range parameters (phi) values
> > > accordingly and see if
> > > the problem persists
> > > 
> > > Please let me know
> > > 
> > > best
> > > P.J.
> > > 
> > > 
> > > Em Dom, 2010-05-23 às 17:37 +0000, Lho Lho
> escreveu:
> > > > Dear Paulo Justiniano Ribeiro 
> > > > 
> > > > After performing the proflik() function I
> had
> > this
> > > message from R:
> > > > 
> > > > ##proflik:computing profile likelihood for
> the
> > sill
> > > > Error in solve.default(xix, xiy) :
> > > >   system is computationally singular:
> > > reciprocal condition number=5.05981e-19##
> > > > 
> > > > I guess it is related to "matrice" with the
> term
> > > solve.default(??)
> > > > 
> > > > Unfortunately, I was not able to overcome
> this
> > > problem.
> > > > 
> > > > Would you like to help me?
> > > > 
> > > > 
> > > > Please find attached my data in text format
> > (Apple).
> > > > 
> > > > My  R code was :
> > > > 
> > > >
> > >
> >
> ini.values=expand.grid(x=seq(500,1300,by=25),y=seq(0,0.40,by=0.01))
> > > > inivalues<-as.matrix(ini.values)
> > > > 
> > > >
> > >
> >
> Burrows.likfit<-likfit(Burrows.geo,trend="2nd",fix.lambda=TRUE,lambda=1,ini.cov.pars=ini.values,fix.nugget=FALSE,nugget=0,lik.method="ML",cov.model="mat")
> > > > 
> > > >
> > >
> >
> profile<-proflik(Burrows.likfit,geodata=Burrows.geo,sill.values=seq(1210,1213,l=4),range.values=seq(0.026,0.029,l=4),nugget.values=seq(31,34,l=4),
> > > uni.only=T))
> > > > 
> > > > 
> > > > Hocine BENCHIKH
> > > > PhD student UCC
> > > > Ireland
> > > > 
> > > > 
> > > > 
> > > > 
> > > >       
> > > 
> > > 
> > > 
> > 
> > 
> > 
> > 
> 
> 
>     
>







More information about the R-sig-Geo mailing list