Displaying 20 results from an estimated 120 matches similar to: "Repeating functions"
2003 Apr 14
1
How to do the significant test on Local Moran's I
Dear list:
I've tried professor Roger Bivand's spdep package
for a while, and found it is quite useful. However,
when considering the significance test of the local
moran's index under the assumption of both normality
and randomization, I just can't get a clue from the
package's calculating results. I also read professor
Luc Anselin's 1995 LISA paper (geographical
2007 Jun 15
2
model.frame: how does one use it?
Philipp Benner reported a Debian bug report against r-cran-rpart aka rpart.
In short, the issue has to do with how rpart evaluates a formula and
supporting arguments, in particular 'weights'.
A simple contrived example is
-----------------------------------------------------------------------------
library(rpart)
## using data from help(rpart), set up simple example
myformula <-
2013 Mar 05
1
Remote database & local database, and adding new weight found vtable error
Hello, guys.
Q1.
now I have load all the docid and its document data into a dictionary for
faster loading data instead of calling
Xapian::MSetIterator i;
i.get_document().get_data();
but I was happened to discover that the dictionaries got by such two method
were different:
both methods use DB1, DB2
method 1:
Xapian::Database db = Xapian::Database(the path of DB1);
Xapian::Database db2 =
2010 Jun 03
1
mlogit and weights
Hello,
I can't figure out why using and not using weights in mlogit yields
identical results. My motivation is for the case when an
"observation" or "individual" represents a number of individuals. For
example,
library(mlogit)
library(AER)
data("TravelMode", package = "AER")
TM <- mlogit.data(TravelMode, choice = "choice", shape =
2012 Jul 17
1
weighted mean by week
Hello!
I wrote a code that works, but it looks ugly to me - it's full of loops.
I am sure there is a much more elegant and shorter way to do it.
Thanks a lot for any hints!
Dimitri
# I have a data frame:
x<-data.frame(group=c("group1","group2","group1","group2"),
myweight=c(0.4,0.6,0.4,0.6),
2007 Nov 21
1
problem with nb2listw
Hi,
I am a new student to R and I was hoping someone could help me with
the error message I keep getting when I try to use the nb2listw()
function.
I have 45 sites and I want to get an autocorrelation value for sites
within 1000m of each other.
coords<-cbind(EAST,NORTH)
coords<-as.matrix(coords)
nb1000<-dnearneigh(coords,0,1000,longlat=TRUE)
then when I try to run the
2013 Mar 04
2
Need Beginner Guide for Matcher Optimisations Project
Hi,
While searching for a project which matches my interest andskill level, I
found this project named Matcher Optimization. This project is really
challenging and excting from my view point and I would like to be a part of
this project.
Optimization techniques metioned in the reference links provided will take
some time for me to have a good understanding about them. But I am trying
to get my
2003 Jun 30
2
spatial correlation test
hello,
I want to do a test for spatial correlation.
I tried it with geary.test() but I don't understand the required input.
x= a numeric vector the same length as the neighbours list in listw (my
sampled data, I assume)
listw= a listw object created for example by nb2listw (well when I check
nb2listw() I get to "neighbours - an object of class nb" - but I couldn't
figure
2003 Nov 27
1
lagsarlm - using mixed explanatory variables (spdep package)
Hello
I'm very new to R (which is excellent), so apologies if this has already
been raised. In the spdep package, I'm trying to undertake an
autoregressive mixed model using the lagsarlm function. This is working
fine, but there does not appear to be a method of including an explanatory
variable without it automatically being included as a lagged term. I'm
after something along the
2009 Jul 15
1
Simulation code error
Dear List,
I have some problem with my simulation code. Here is output from R:
> sim.sp <- function(data,CM,n,N)
+ {
+ C <- matrix(rep(NA,N),ncol=1)
+ for(i in 1:N)
+ {
+ j <- n
+ xx <- which(colSums(CM[j,])==1)
+ V <- names(xx)
+ V <- paste(V, collapse="+")
+ V <- paste("SBA~", V)
+ rd <- round(nrow(data)*(2/3))
+ d <-
2003 Nov 16
3
an object of class lm returned by lm?
Can someone tell me what an object of class lm returned by lm means? I
assumed it mean the regression model - but I'm not sure how to enter
this in. I have tried
y~a+b
but this is not working. I have also tried saving the regression
results and entering these, but again this is incorrect.
This language is from the following:
lm.LMtests(model, listw, zero.policy=FALSE,
2009 Jul 15
1
Error in simulation R-code
Dear List,
I have got error message when I run the R-code. Can anyone has a suggestion?
v.code <- df.bm7[,c(10:31)]; v.code[1:3,]
names(v.code)
CM = v.code # variable binomial code
sim.sp <- function(data,CM,n,N)
{
C <- matrix(rep(NA,N),ncol=1)
for(i in 1:N)
{
j <- n
xx <- which(colSums(CM[j,])==1)
V <- names(xx)
V <- paste(V,
2003 Jul 01
0
RE: question about spatial correlation with Xs and Ys
-----Original Message-----
From: r-help-request at stat.math.ethz.ch
[mailto:r-help-request at stat.math.ethz.ch]
Sent: Tuesday, July 01, 2003 3:09 AM
To: r-help at stat.math.ethz.ch
Subject: R-help Digest, Vol 5, Issue 1
At 18:48 30/06/2003, Martin Wegmann wrote:
>hello,
>
>I want to do a test for spatial correlation.
>I tried it with geary.test() but I don't understand the
2004 Jun 18
1
how to store estimates results as scalars of a matrix?
Dear R users,
I've written a loop to generate Moran's test (spdep package) on serval
subsamples of a large dataset. See below a short example.
My loop is working fine, however I would like to be able to store the test
results as lines of a matrix, that I would latter be able to export as a
dataset. My problem is that I'm not sure how I could do this using R.
Any help will be much
2008 Apr 18
1
spdep question - Moran's I
Dear all,
I would like to calculate a Moran's I statistic using the moran function in the spdep package. The problem I'm having deals with how to create the listw object.
My data stems from the area of social network analysis. I have list of poeple and for each pair of them I have a measure of their relationship strength. So my dataset looks like: Jim; Bob; 0.5
This measure of
2011 Jul 12
1
Subsetting NaN values in localG()
Hi,
I'm currently trying to calculate local Getis-Ord Gi* statistics for a
169x315 cell matrix of temperature values, below is the code I currently
have (diffc is the data vector I am removing NaN values from, and I am
moving said values to diffD; -999 represents NaN values; id contains ID
values for cells I want to use in the calculation, which I already know to
contain 25064 values):
2013 Apr 16
1
Spatial Ananlysis: zero.policy=TRUE doesn't work for no neighbour regions??
Hello,
I'm new to R and to Spatial Analysis and got a problem trying to create a
Spatial Weights Matrix.
*I us the following code to create the Neighbourslist:*
>library(maptools)
>library(spdep)
>library(rgdal)
>location_County<- readShapePoly("....")
>proj4string(location_County)<- CRS("+proj=longlat ellps=WGS84")
>location_nbq<-
2007 Oct 26
1
Help needed on calculation of Moran's I
Hi,
I am trying to calculate Moran's I test for the residuals for a
regression equation, but I have trouble converting my coordinates into
nb format.
I have used the dnearneigh() funtion now with an arbitrarily high upper
distance to make it include all plots. However, when I do the
lm.morantest() I get a Moran's I value which is the same as the expected
value and a P-value of 1.
I
2009 Jun 06
1
large numbers of observations using ME() of spdep
Dear All,
We aim to remove the spatial structure of our data using Moran Eigen
Vectors and spdep package . Our data has 3694 samples and 13
variables.
The computer stop working after almost 4 days of processing (we found
it emitting a sharp sound and with all colors on the screen. No
wories, it was restared without problem!). And we are left with
nothing: no result file was produced since the
2005 Jan 30
1
New user...tips for spdep
[This email is either empty or too large to be displayed at this time]