[R-sig-Geo] ascii multicollinearity

Paul Hiemstra p.hiemstra at geo.uu.nl
Wed Nov 25 15:16:41 CET 2009


Hakim Abdi wrote:
> Dear All:
>
> I tried searching the r-sig-geo forums regarding this issue but was unable
> to find a solution. I have a set of variables in ASCII format and I'm trying
> to see if there's linear inter-correlation amongst some of them. Is there a
> way in R to assess multicollinearity amongst ASCII grids?
>   
Hi,

You can read the asciigrids in to R using rgdal (readGDAL function). A 
handy way to calculate the linear correlation between the variables is 
to combine them into a data.frame (where each grid is a long vector, 
i.e. a column, in the data.frame) and use the cor() function. Do check 
what assumptions are made when calculating the correlation, for example 
what the influence is when the data is spatially correlated.
> Also, each grid contains 1,919,810 cells and is about ~13-14 MB, so far I
> have a total of 10 grids, would that be a problem for R? I'm running 2GBs of
> memory and two Intel dual-core processors @ 1.73GHz each.
>   
doesn't seem like a problem to me, but try and see.

cheers,
Paul
> Thanks for the response.
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>   


-- 
Drs. Paul Hiemstra
Department of Physical Geography
Faculty of Geosciences
University of Utrecht
Heidelberglaan 2
P.O. Box 80.115
3508 TC Utrecht
Phone:  +3130 274 3113 Mon-Tue
Phone:  +3130 253 5773 Wed-Fri
http://intamap.geo.uu.nl/~paul



More information about the R-sig-Geo mailing list