Displaying 6 results from an estimated 6 matches for "nbdists".
2003 Aug 07
0
spdep error message
...kage "spdep" to run spatial regressions on a data set
with about 2500 observations. It has performed well up until now, but the
following code resulted in an error:
> load("Panel.90s.ok.R")
> attach(Panel.90s.ok)
> neighs<-dnearneigh(cbind(x,y),0,50000)
> help(nbdists)
> dists<-nbdists(neighs,cbind(x,y))
> Weights<-nb2listw(neighs,zero.policy=T,glist=dists)
>
error.model.rprice<-errorsarlm(log(wells+1)~log(year)+log(area)+log(lag.rprice
)+log(marketable+1)+log(prov.rds+1)+log(ind.rds+1)+log(seismic+1)+log(pipeline
s+1)+log(min.year)+log(max.ye...
2009 Jun 06
1
large numbers of observations using ME() of spdep
...;dy", "dx")];
coordinates(taimin.xy) <- ~dy+dx; #dy, dx, name of the respective
coordinate columns
coords<-coordinates(taimin.xy);
library(spdep);
TaiminGabrielGraph<-gabrielneigh(coords, nnmult = 12);
tai.gab.nb<-graph2nb(TaiminGabrielGraph,sym=TRUE);
nbtaim_distsg <- nbdists(tai.gab.nb, coords);
nbtaim_simsg <- lapply(nbtaim_distsg, function(x) (1-((x/(4*50))^2)) );
MEtaig.listw <- nb2listw(tai.gab.nb, glist=nbtaim_simsg, style="B");
sevmtaig <- ME(Presabs
~Age+Curv+Zon2005+ZoneMeiji+Wi+Sol+Slope+Seadist+Elev+Basin,data=taimin,
family=binomial,listw=...
2004 Aug 19
3
Do you know if you can map a large minimum spanning tree in R?
Thanks Mike.
My data has longitude and latitude coords and I used distAB {clim.pact}
then mst {ape} to calculate my minimum spanning tree. The nodes are
telecoms sites from all over Australia. My goal is to determine the
minimum cost of linking them via cabling, and I'm starting by
calculating the distance "as the crow flies", but will probably
eventually need to calculate the
2012 Jul 12
0
How to handle NA-values in raster-based Geary´s C test?
...verwrite=TRUE)
value <- as.matrix(subset)
# Creation of a list of integer vectors giving the region id numbers
for the neighbors within the grid extent
nb <- cell2nb(50, 50, type="queen", torus=TRUE)
# Calculation of the distances along the links in the neighbous list
dist <- nbdists(nb, coordinates(subset), longlat=TRUE)
# Converting the distances to inverse distance values
inv.dist <- lapply(dist, function (x) 1/(x*100))
# Supplementing the neighbors list with spatial weights for a coding scheme
nb.idw <- nb2listw(nb, glist=inv.dist, style="W")
summary(unlis...
2010 Nov 29
1
Moran I for very large data set
Hi
Are there any more efficient ways of calculating the neighbourhood object for large datasets?
I am trying to compute Moran I statistics for a very large data set (over 14,000 points). I have been using moran.test from the spdep package and everything works fine for a small data set (200 points). However, applying the same script to the whole dataset is taking days to compute (it so far has
2009 Jan 07
1
troubles performing Moran.I test
dear R users,
I have troubles performing Moran.I test as suggested on
http://www.ats.ucla.edu/stat/r/faq/morans_i.htm
my spatial data are longitude and lattitide of communities. The
calculation of the inverse distance matrix according to the homepage
(using my data)
datAL <- read.csv2("C:\\Konvergenz AL.csv", header=T)
ALdist <- as.matrix(dist(cbind(datAL$L?nge,