[R-sig-Geo] QIC in gee models

wtassinari at yahoo.com.br wtassinari at yahoo.com.br
Wed May 9 19:13:31 CEST 2012


I don't know how to extract te QIC values in gee models in R (gee or geeglm comand)

Thank you
Tassinari, W
Enviado através do meu BlackBerry® da Nextel

-----Original Message-----
From: r-sig-geo-request at r-project.org
Sender: r-sig-geo-bounces at r-project.org
Date: Wed, 09 May 2012 12:00:04 
To: <r-sig-geo at r-project.org>
Reply-To: r-sig-geo at r-project.org
Subject: R-sig-Geo Digest, Vol 105, Issue 9

Send R-sig-Geo mailing list submissions to
	r-sig-geo at r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
	https://stat.ethz.ch/mailman/listinfo/r-sig-geo
or, via email, send a message with subject or body 'help' to
	r-sig-geo-request at r-project.org

You can reach the person managing the list at
	r-sig-geo-owner at r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-Geo digest..."


Today's Topics:

   1. Managing layer Nas in occurrences (Agus Camacho)
   2. Re: R / ArcGIS (Anthony Fischbach)
   3. Re: Managing layer Nas in occurrences (Robert J. Hijmans)
   4. Re: R / ArcGIS (Roger Bivand)
   5. Re: gdistance resistanceDistance error (ignacio.quintero)
   6. Re: gdistance resistanceDistance error (Jacob van Etten)
   7. Re: gdistance resistanceDistance error (ignacio.quintero)
   8. convex hull on PCA results of BIOCLIM variables (Julian WITTISCHE)


----------------------------------------------------------------------

Message: 1
Date: Tue, 8 May 2012 12:13:05 -0300
From: Agus Camacho <agus.camacho at gmail.com>
To: r-sig-geo at r-project.org
Subject: [R-sig-Geo] Managing layer Nas in occurrences
Message-ID:
	<CALsJ7pQw-zxnWvvNZ=Q17QNaFVfEyq38=y=oNC+u5Hfg9P9uYg at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Dear all,

When dealing with some occurrences, I found some unexplicable Nas.
The map attached comes from nothern south america. Red dots are the
problematic occurences (=without climatic layer data) and the fine ones are
green.
It looks to me like there is some mismatching between the occurrences, the
map and the layers. However, I dont know how to solve it and I am afraid of
future problems like this for other occurences next to the coast.
Maybe should I use another coastline database and use the value of the
nearest raster cell containing data?

Any hint about this problem would be appreciated.

The code used to generate the map and dot was:
plot(wrld_simpl, xlim=c(min(x$Longitude), max(x$Longitude)),
ylim=c(min(x$Latitude), max(x$Latitude)),
axes=TRUE,col='light yellow')
box()
points(fine, col='green', pch=20, cex=0.75)
points(problems, col='red', pch=20, cex=0.75)

Thanks in advance.
Agus
-- 
Agust?n Camacho Guerrero.
Doutorando em Zoologia.
Laborat?rio de Herpetologia, Departamento de Zoologia, Instituto de
Bioci?ncias, USP.
Rua do Mat?o, trav. 14, n? 321, Cidade Universit?ria,
S?o Paulo - SP, CEP: 05508-090, Brasil.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120508/f2144cd3/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: points with Nas.png
Type: image/png
Size: 4129 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20120508/f2144cd3/attachment-0001.png>

------------------------------

Message: 2
Date: Tue, 8 May 2012 08:33:57 -0700 (PDT)
From: Anthony Fischbach <afischbach at usgs.gov>
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] R / ArcGIS
Message-ID: <1336491237007-7539547.post at n2.nabble.com>
Content-Type: text/plain; charset=us-ascii

Rodger, 
can you direct us to more on the forthcoming improvements to RODBC in R
2.15.0?
I have found RODBC useful for integrating tabular data from ArcGIS
compatable .mdb files, but found the handling of date time fields
problematic.
-Tony

-----
Tony Fischbach, Wildlife Biologist
Walrus Research Program
Alaska Science Center
U.S. Geological Survey
4210 University Drive
Anchorage, AK 99508-4650

AFischbach at usgs.gov
http://alaska.usgs.gov/science/biology/walrus
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/R-ArcGIS-tp7293420p7539547.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



------------------------------

Message: 3
Date: Tue, 8 May 2012 09:03:08 -0700
From: "Robert J. Hijmans" <r.hijmans at gmail.com>
To: Agus Camacho <agus.camacho at gmail.com>
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] Managing layer Nas in occurrences
Message-ID:
	<CANtt_hzxAFECF0cpi9Btyjbbb7=HZDf3aQcBJY6S7q60nWmkDg at mail.gmail.com>
Content-Type: text/plain

Agus,

If you find NAs in raster data for certain point locations, you probably
should plot these points on that raster.
And then perhaps compare the raster to wrld_simpl. Although it is a bit
simpl, as the name suggests and your plot confirms, most of these red
points are clearly on land.
For a higher resolution coastline you can use, for example,

library(raster)
wrld_cmplx <- getData('countries')

Robert


On Tue, May 8, 2012 at 8:13 AM, Agus Camacho <agus.camacho at gmail.com> wrote:

> Dear all,
>
> When dealing with some occurrences, I found some unexplicable Nas.
> The map attached comes from nothern south america. Red dots are the
> problematic occurences (=without climatic layer data) and the fine ones are
> green.
> It looks to me like there is some mismatching between the occurrences, the
> map and the layers. However, I dont know how to solve it and I am afraid of
> future problems like this for other occurences next to the coast.
> Maybe should I use another coastline database and use the value of the
> nearest raster cell containing data?
>
> Any hint about this problem would be appreciated.
>
> The code used to generate the map and dot was:
> plot(wrld_simpl, xlim=c(min(x$Longitude), max(x$Longitude)),
> ylim=c(min(x$Latitude), max(x$Latitude)),
> axes=TRUE,col='light yellow')
> box()
> points(fine, col='green', pch=20, cex=0.75)
> points(problems, col='red', pch=20, cex=0.75)
>
> Thanks in advance.
> Agus
> --
> Agustín Camacho Guerrero.
> Doutorando em Zoologia.
> Laboratório de Herpetologia, Departamento de Zoologia, Instituto de
> Biociências, USP.
> Rua do Matão, trav. 14, nº 321, Cidade Universitária,
> São Paulo - SP, CEP: 05508-090, Brasil.
>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>

	[[alternative HTML version deleted]]



------------------------------

Message: 4
Date: Tue, 8 May 2012 19:23:30 +0200 (CEST)
From: Roger Bivand <Roger.Bivand at nhh.no>
To: Anthony Fischbach <afischbach at usgs.gov>
Cc: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] R / ArcGIS
Message-ID: <alpine.LRH.2.02.1205081920230.12316 at reclus.nhh.no>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Tue, 8 May 2012, Anthony Fischbach wrote:

> Rodger,
> can you direct us to more on the forthcoming improvements to RODBC in R
> 2.15.0?
> I have found RODBC useful for integrating tabular data from ArcGIS
> compatable .mdb files, but found the handling of date time fields
> problematic.

If you are referring to using readOGR() in rgdal on Windows with the CRAN 
Windows binary package, then I believe that it now contains a working Pgeo 
driver (thanks to Prof. Brian Ripley). I do not know if the use of ODBC 
there treats date time fields more gracefully than RODBC. I have no sample 
files from which to judge, I'm afraid.

Roger

> -Tony
>
> -----
> Tony Fischbach, Wildlife Biologist
> Walrus Research Program
> Alaska Science Center
> U.S. Geological Survey
> 4210 University Drive
> Anchorage, AK 99508-4650
>
> AFischbach at usgs.gov
> http://alaska.usgs.gov/science/biology/walrus
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/R-ArcGIS-tp7293420p7539547.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



------------------------------

Message: 5
Date: Tue, 8 May 2012 16:32:43 -0700 (PDT)
From: "ignacio.quintero" <ignacioquinterom at gmail.com>
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] gdistance resistanceDistance error
Message-ID: <1336519963610-7541017.post at n2.nabble.com>
Content-Type: text/plain; charset=us-ascii

Dear all,

I have came across the same error using resistanceDistance (and not
costDistance with same data):

  "#Get matrix of resistance distances. 
  Error in Cholesky(Lr) : CHOLMOD factorization was unsuccessful 
  In addition: Warning message: 
  In Cholesky(Lr) : 
    Cholmod warning 'not positive definite' at 
  file:../Cholesky/t_cholmod_rowfac.c, line 432"

I was using also a very large raster grid (~5000000 cells). This seems to be
the problem (do not know if because of memory): I cropped the same big
raster into a smaller one containing the locality points (and, of course, a
big frame outside; however, currently, I do not know if the frame extent
will change the results...) and it worked perfectly.

Hope this helps (although I would like to know the exact problem (memory or
other issue) with the resistanceDistance function)

Best,

Ignacio

--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7541017.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



------------------------------

Message: 6
Date: Tue, 8 May 2012 18:53:21 -0500
From: Jacob van Etten <jacobvanetten at yahoo.com>
To: "ignacio.quintero" <ignacioquinterom at gmail.com>
Cc: "r-sig-geo at r-project.org" <r-sig-geo at r-project.org>
Subject: Re: [R-sig-Geo] gdistance resistanceDistance error
Message-ID: <B1D716CE-0C92-4EEB-90A8-D580A8A42E86 at yahoo.com>
Content-Type: text/plain;	charset=us-ascii

Dear Ignacio,

The problem may also have to do with the values in the TransitionMatrix. A reproducible example would be good to have.

Jacob

On 8/05/2012, at 18:32, "ignacio.quintero" <ignacioquinterom at gmail.com> wrote:

> Dear all,
> 
> I have came across the same error using resistanceDistance (and not
> costDistance with same data):
> 
>  "#Get matrix of resistance distances. 
>  Error in Cholesky(Lr) : CHOLMOD factorization was unsuccessful 
>  In addition: Warning message: 
>  In Cholesky(Lr) : 
>    Cholmod warning 'not positive definite' at 
>  file:../Cholesky/t_cholmod_rowfac.c, line 432"
> 
> I was using also a very large raster grid (~5000000 cells). This seems to be
> the problem (do not know if because of memory): I cropped the same big
> raster into a smaller one containing the locality points (and, of course, a
> big frame outside; however, currently, I do not know if the frame extent
> will change the results...) and it worked perfectly.
> 
> Hope this helps (although I would like to know the exact problem (memory or
> other issue) with the resistanceDistance function)
> 
> Best,
> 
> Ignacio
> 
> --
> View this message in context: http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7541017.html
> Sent from the R-sig-geo mailing list archive at Nabble.com.
> 
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



------------------------------

Message: 7
Date: Tue, 8 May 2012 18:47:51 -0700 (PDT)
From: "ignacio.quintero" <ignacioquinterom at gmail.com>
To: r-sig-geo at r-project.org
Subject: Re: [R-sig-Geo] gdistance resistanceDistance error
Message-ID: <1EF2C1D4-C184-4F79-9072-76A6876DC03D at gmail.com>
Content-Type: text/plain; charset=us-ascii

Dear Jacob,

Hope you don't mind if I don't write in the post but directly to you. Actually, as you might suppose, the data is too heavy in order for me to send it. However, I will summ it up: the data is a grid of the American continent with a ~0.05x0.05 degree resolution and values that correspond to the probability of presence (ranging from ~1.5e-7 to ~0.9). There are more than 5000000 cells, but about 2/3 are NA's (is this what is causing the trouble?) I have looked how to remove this NA cells without success (when I rasterize the points, the grid automatically adds a rectangular grid with NAs where no data is found).

Any help would be most appreciated,

Best

Ignacio


On May 8, 2012, at 6:54 PM, Jacob van Etten [via R-sig-geo] wrote:

> Dear Ignacio, 
> 
> The problem may also have to do with the values in the TransitionMatrix. A reproducible example would be good to have. 
> 
> Jacob 
> 
> On 8/05/2012, at 18:32, "ignacio.quintero" <[hidden email]> wrote: 
> 
> > Dear all, 
> > 
> > I have came across the same error using resistanceDistance (and not 
> > costDistance with same data): 
> > 
> >  "#Get matrix of resistance distances. 
> >  Error in Cholesky(Lr) : CHOLMOD factorization was unsuccessful 
> >  In addition: Warning message: 
> >  In Cholesky(Lr) : 
> >    Cholmod warning 'not positive definite' at 
> >  file:../Cholesky/t_cholmod_rowfac.c, line 432" 
> > 
> > I was using also a very large raster grid (~5000000 cells). This seems to be 
> > the problem (do not know if because of memory): I cropped the same big 
> > raster into a smaller one containing the locality points (and, of course, a 
> > big frame outside; however, currently, I do not know if the frame extent 
> > will change the results...) and it worked perfectly. 
> > 
> > Hope this helps (although I would like to know the exact problem (memory or 
> > other issue) with the resistanceDistance function) 
> > 
> > Best, 
> > 
> > Ignacio 
> > 
> > -- 
> > View this message in context: http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7541017.html
> > Sent from the R-sig-geo mailing list archive at Nabble.com. 
> > 
> > _______________________________________________ 
> > R-sig-Geo mailing list 
> > [hidden email] 
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 
> _______________________________________________ 
> R-sig-Geo mailing list 
> [hidden email] 
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 
> 
> If you reply to this email, your message will be added to the discussion below:
> http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7541075.html
> To unsubscribe from gdistance resistanceDistance error, click here.
> NAML



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/gdistance-resistanceDistance-error-tp7076485p7541430.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



------------------------------

Message: 8
Date: Wed, 9 May 2012 08:43:55 +0000
From: Julian WITTISCHE <jwittische at hotmail.com>
To: <r-sig-geo at r-project.org>
Subject: [R-sig-Geo] convex hull on PCA results of BIOCLIM variables
Message-ID: <DUB112-W10968271E5E1598CBBE5861CF110 at phx.gbl>
Content-Type: text/plain


Dear all,
I have a problem to plot a convex hulls on PCA results. The PCA has reduced the 19 BIOCLIM variables to two axes and I want to plot a convex hull to be able to illustrate the environmental space overlap of two species. 
This is my script:
library(Hmisc);library(ade4);
#Import data
batrabio<-read.table(file="Bioclimfull.txt", sep="\t", header=TRUE);batrabio<-batrabio[,c(1,4:22)];  #To select only species name and the 19 bioclim variables columns      batrapair<-batrabio[batrabio$SCIENTIFIC_NAME=="Batrachoseps minor"|  batrabio$SCIENTIFIC_NAME=="Batrachoseps incognitus",]; #To select two species to compare and illustrate their environmental space
batrapair<-unique(batrapair[,]);#To select only unique localities
#Run PCAs based on columns with climate data
pca.ade4<-dudi.pca(batrapair[,2:20], center=T, scale=T, scannf=T); 2;#number of axes
#Create convex hull using PCA axes, and colour-code points according to species name
convex.hull<-s.chull(pca.ade4$li,as.factor(batrapair$SCIENTIFIC_NAME),add.plot=F, grid=F, clabel=0, origin=c(0,0),addaxes=T,col=c("red","blue"), cpoint=.65) 

I get the axes, the grid, the species name label but nothing else. I would greatly appreciate any advice as I have not been able to figure myself how to solve this problem.
Thank you very much,
Julian 

 		 	   		  
	[[alternative HTML version deleted]]



------------------------------

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo


End of R-sig-Geo Digest, Vol 105, Issue 9
*****************************************


More information about the R-sig-Geo mailing list