similar to: lagsarlm - using mixed explanatory variables (spdep package)

Displaying 20 results from an estimated 1000 matches similar to: "lagsarlm - using mixed explanatory variables (spdep package)"

2004 Apr 06
1
Storing p-values from a glm
Hi, for example one could do it this way: v <- summary(fit)$coefficients[,4] the coefficient attribute is a matrix, and with the "4" you refere to the pvalue (at least in lm - don't know if summary(glm) produces sligthely different output). to skip the intercept (1st row): v <- summary(glmfit)$coefficients[-1,4] hope this helps, Arne -- Arne Muller, Ph.D.
2010 Dec 09
1
Using Lagsarlm
I'm trying to use the spdep package to calculate this: y = rho W y + e I don't want to use explanatory variables, just the lag from the dependent variable. How would I code this?
2004 Nov 18
1
Method dispatch S3/S4 through optimize()
I have been running into difficulties with dispatching on an S4 class defined in the SparseM package, when the method calls are inside a function passed as the f= argument to optimize() in functions in the spdep package. The S4 methods are typically defined as: setMethod("det","matrix.csr", function(x, ...) det(chol(x))^2) that is within setMethod() rather than by name before
2005 Nov 29
3
Reclassifying values within a vector to several other values
Dear List Apologies for such a simple question: I have a vector of 738 elements, coded with values between 1 and 16 (but not containing 7, 10, 11 or 13) and wish to recode value 14 to 1, 4 to 2, 1 to 3, 2 to 4 and all other values to 5. I've been trying to use the replace function (in base) and %in%, but without success. Many thanks Roy
2011 May 04
1
Instrumental variable quantile estimation of spatial autoregressive models
Dear all, I would like to implement a spatial quantile regression using instrumental variable estimation (according to Su and Yang (2007), Instrumental variable quantile estimation of spatial autoregressive models, SMU economics & statistis working paper series, 2007, 05-2007, p.35 ). I am applying the hedonic pricing method on land transactions in Luxembourg. My original data set contains
2005 Jan 30
1
New user...tips for spdep
[This email is either empty or too large to be displayed at this time]
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
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
2003 Aug 07
0
spdep error message
Hello, I have been using the package "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)) >
2004 May 04
1
spdep question
Dear list, (also sent to Roger Bivand, but perhaps somebody of you can help me also) I am trying to use package spdep for fitting an SAR model with errorsarlm. However, I am not sure how to make a valid nb object out of my neighborhood. As far as I have seen, there is no documentation for nb.object. I have done the following: class(pschmid$nb) <- "nb" # pschmid is a prab object as
2006 Sep 29
1
Helmert contrasts for repeated measures and split-plot expts
Dear R-help I have two separate experiments, one a repeated-measures design, the other a split-plot. In a standard ANOVA I have usually undertaken a multiple-comparison test on a significant factor with e.g TukeyHSD, but as I understand it such a test is inappropriate for repeated measures or split-plot designs. Is it therefore sensible to use Helmert contrasts for either of these designs?
2007 Oct 15
1
Distance matrix in SpDep-package
Hello everybody, I would like to use the SpDep-package (especially the Local Moran index analysis and the Getis-Ord statistics) in R for analysing my data. However, I don't have x-y coordinates, but my data is in a distance matrix format. Is it possible to use the SpDep package with predefined distances as well instead of letting the program determining the distance itself by the function
2005 Feb 11
3
How to solve error : "cannot allocate vector of size 1208235 Kb"
Howdy R gurus ! I am newbie to R I use R 2.0.1 in Windows XP. When I run R I got the follwoing memory error. My physical memory size is 3 Gb. My R got the memory problem when it reached to about 2 Gb. Thanks in advance, > library(spdep) > sfr.lagsarlm <- lagsarlm(sfr.data$Bldgsqft ~ sfr.data$Ncounty + sfr.data$Nugb + sfr.data$Ngroup, data=sfr.data, listw=sfr.listw,
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
2011 Feb 04
1
Error in solve.default(inf, tol = tol.solve) :
Hello, I'm trying to run a lagsarlm (maximum likelihood estimation of a spatial lag model) in the spdep library ; but R gives following error message: Error in solve.default(inf, tol = tol.solve) : system is computationally singular: reciprocal condition number = 4.20137e-12 I get the same message when I try to run de lagsarlm with a bigger data set (4333 regions). The command
2005 Dec 29
1
Repeating functions
Hi, I have a number of spatial weight files and using Roger Bivand's spdep, I would like to 1. Convert them into neighbor lists using 2. Convert the neighbor lists into spatial weights For a given file, the syntax would be mygal_nb1 <- read.gal("mygalfile1", override.id = TRUE) myweight1 <- nb2listw(mygal_nb1) I have mygalfile[i] with i from 1 through to 6 and would like to
2008 Oct 08
1
Error in spdep: system is computationally singular
Hi all, I am trying to run an autologistic model using the function errorsarlm from spdep package. **I built an XY matrix extracting the two colums from matriz** coords1<-matriz[matriz$casos1==1, c(4,5)] coords1<-as.matrix(coords1) **I identify neighbours of region points** nb20<-dnearneigh(coords1,0,20,longlat=TRUE) ** I build a neighbours list with spatial weights**
2007 Nov 26
1
Unweighted meta-analysis
Hello I'm very much a beginner on meta-analysis, so apologies if this is a trivial posting. I've been sent a set data from separate experimental studies, Treatment and Control, but no measure of the variance of effect sizes, numbers of replicates etc. Instead, for each study, all I have is the mean value for the treatment and control (but not the SD). As far as I can tell, this forces
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
2003 May 21
1
help on spatial data
Hi, I have a dataset with x and y coordinates and in each point I have an identity of point, in some cases I can have more then one identity by point. My dataset is something like this: > x <- rep(c(1:4),4) > y <- rep(c(1:4),c(4,4,4,4)) > area1 <- sample(factor(rep(c("a","b","c","d"),4))) > area2 <-