[R-sig-Geo] How to calculate squared R of spatial autoregressive models

2010-11-22 Thread elaine kuo
Dear List, I am comparing the squared R values of linear models and its spatial autoregressive counterparts. (SARerror) (1. lm (Y~X1) 2. lm (Y~ X1+X2) 3. lm(Y~X1+X2+X3)) The squared R values of linear models are generated by command summary (lm). Similarly, I tried to produce those of sp

[R-sig-Geo] Monte Carlo simulation and random habitat selection

2010-08-25 Thread elaine kuo
Dear List, I am trying to predict species distributions using MADIFA (Calenge et al. 2008). However, the codes (Monte Carlo simulation) are not familiar to me, and they seem unavailable in package adehabitat. (similar to the response from the authors) Please kindly help and thank you in advance.

Re: [R-sig-Geo] identical p-value of lm.LMtests (spdep)

2010-08-12 Thread elaine kuo
So stay with errorsarlm() for error SAR models, or spautolm() for a wider selection of error models. => ?spautolm, which shows Spatial conditional and simultaneous autoregression model estimation Description: Function taking family and weights arguments for spatial autoregression mod

[R-sig-Geo] identical p-value of lm.LMtests (spdep)

2010-08-12 Thread elaine kuo
Dear List, I wanna know if lag or error model is better to examine a spatial regression model. However, the results of their p-values are the same, which shows no difference between the models in the aspect. Please kindly help and thanks. Elaine code rm(list=ls()) datam <-read.csv("c:/migratio

Re: [R-sig-Geo] error in errorsarlm

2010-08-12 Thread elaine kuo
Dear List, Eventually computing lagsarlm and errorsarlm become successful, Using the code below. (maybe knearneigh helps to solve some issue.) (ref. An Introduction to Spatial Regression Analysis in R, Luc Anselin, 2003) Elaine code rm(list=ls()) datam <-read.csv("c:/migration/Mig_ra

Re: [R-sig-Geo] error in errorsarlm

2010-08-01 Thread elaine kuo
Dear Dr. Bivand and list Thank you for the patience. Only one question remains >> >> 2. great distance circle >> >> => longlat = TRUE returns no valid observation ... >>similar error messages have been researched in the archived mail >>but no identical case found... >> Please kindly

Re: [R-sig-Geo] error in errorsarlm

2010-07-23 Thread elaine kuo
> > 1. change method to Matrix >> >> >> System calculation is specific, the condition is =5.14146e-17 (translated >> from Chinese) >> >> Warning messages: >> > > Warning not a problem, but the error suggests scaling problems in the > covariance matrix of the coefficients. The X variables are

Re: [R-sig-Geo] error in errorsarlm

2010-07-20 Thread elaine kuo
Hello, Thanks for the always concerns. answering the previous questions first. >> 1. distance threshold >> > > But 9 what, metres, degrees? Should your code be: > cbind(datam$lat,datam$lon), as the normal ordering is eastings then > northings, not the opposite? => unit is degree, and the la

Re: [R-sig-Geo] error in errorsarlm

2010-07-16 Thread elaine kuo
ror in switch(Generic, `+` = , `-` = { : Cholmod error 'out of memory' at file:../Core/cholmod_memory.c, line 148 On Sat, Jul 17, 2010 at 3:52 AM, Roger Bivand wrote: > On Fri, 16 Jul 2010, elaine kuo wrote: > > Dear List, >> >> I encountered an error message when trying to

[R-sig-Geo] error in errorsarlm

2010-07-16 Thread elaine kuo
Dear List, I encountered an error message when trying to use Chebyshev as method for SAR. Please kindly help and thanks. package spdep was updated on 07162010 system: windows vista home 32-bit R version 2.10.0 (20091026) Elaine Code > library(ncf) > library(spdep) > > # Define coordinates, neig

[R-sig-Geo] errorsarlm out of memory (method Chebyshev undetected in help)

2010-06-25 Thread elaine kuo
to the maximum positive value . 16: the same 17: In t.spam(x) : Reached total allocation of 1535Mb: see help(memory.size) 18: In t.spam(x) : Reached total allocation of 1535Mb: see help(memory.size) 19: In optimize(sar.error.f, interval = interval, maximum = TRUE, ... : NA/Inf is conve

Re: [R-sig-Geo] errorsarlm out of memory

2010-06-25 Thread elaine kuo
lue . 16: the same 17: In t.spam(x) : Reached total allocation of 1535Mb: see help(memory.size) 18: In t.spam(x) : Reached total allocation of 1535Mb: see help(memory.size) 19: In optimize(sar.error.f, interval = interval, maximum = TRUE, ... : NA/Inf is converted to the maximum positive value

[R-sig-Geo] errorsarlm out of memory

2010-06-24 Thread elaine kuo
Dear List, I am using errorsarlm (spdep) to measure SAR autocorrelation but failed as detailed below. system: windows XP and Vista RAM : 2G (XP) and 4G(Vista) sample size : 4500 variable: 4 nb10<-dnearneigh(coords,0,9) the error issue: out of memory of 180 Mb The similar messages in the archiv

[R-sig-Geo] how to find observed Moran's I value using moran.test(spdep)

2010-06-21 Thread elaine kuo
Dear , This is Elaine. I am computing moran's I using moran.test for a generalized linear model (multiregression). The following contents are the results, and I cannot find the observed Moran's I mentioned as estimate in the manual. Please kindly help indicate if there is observed Moran's I did

[R-sig-Geo] comparing non-spatial and spatial generalized linear models

2010-06-20 Thread elaine kuo
Dear I am analyzing a bird richness with possible environmental conditions. Aware of the species autocorrelation, I want to run the model of plain generalized linear models and spatial one. Then the model results will be compared to tell whether autocorrelation may affect the models. Here, I am

[R-sig-Geo] Moran I for generalized linear model

2010-06-17 Thread elaine kuo
This is Elaine. > > I am try the R package spdep to calculate Moran I for each of the 7 > generalized linear > models generated by 3 predictors respectively. > The models were generated by bird richness and the habitual conditions, based on a grid system with the number corresponding to the va

[R-sig-Geo] Moran I for generalized linear model

2010-06-17 Thread elaine kuo
> > This is Elaine. > > I am try the R package spdep to calculate Moran I for each of the 7 > generalized linear > models generated by 3 predictors respectively. > > I read the pdf manual but still confounded which function should be used to > achieved the goal. > Thanks [[alternative H

[R-sig-Geo] how to create locs and make a dataframce cover it and kasc

2009-12-14 Thread elaine kuo
Dear, This is Elaine, a newbie to adehabitat for ENFA. Now I am in the stage of preparing species data and variable data. I learned to prepare the latter one by using kasc. However, I do not know how to create locs (for species data) and make data.frame (like puechabon$kasc, puechabon$locs) cove