Re: [R-sig-Geo] Reproject raster from 0 360 to -180 180?
Use rotate in the package raster see for example: https://stat.ethz.ch/pipermail/r-sig-geo/2011-March/011155.html Bart On 07/09/2013 11:59 PM, Jorge Molinos wrote: Hello everybody, I have a raster that has longtitudes from 0 to 360 with the horizontal center at 180 longtitude http://www.freeimagehosting.net/lr9rb Pre_CCSM_r class : RasterLayer dimensions : 395, 320, 126400 (nrow, ncol, ncell) resolution : 1.125, 0.4294937 (x, y) extent : 0.50001, 360.5, -79.43527, 90.21475 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 data source : in memory names : layer values : 271.2439, 303.2426 (min, max) I want to transform this to a new raster with -180, 180 longtitude range centred at Greenwich meridian (0) for comparisons/analysis with other raster files. I have tried cutting the original raster into two (using the meridian 180 as cutting value) and piece them back together but got sort of a mosaic raster instead http://www.freeimagehosting.net/h5bxo lonlat - data.frame(xyFromCell(Pre_CCSM_r, 1:ncell(Pre_CCSM_r))) lonlat - cbind(lonlat, getValues(Pre_CCSM_r)) head(lonlat) x ygetValues(Pre_CCSM_r) 11.06251 90 271.3698 22.18751 90 271.3698 33.31251 90 271.3698 44.43751 90 271.3698 55.56251 90 271.3698 66.68751 90 271.3698 lolaA - as.matrix(lonlat[lonlat$x180,]) lolaB - as.matrix(lonlat[lonlat$x=180,]) mydata - rbind(lolaA,lolaB) mydat - matrix(mydata[,3], ncol=320,nrow=395,byrow=T) Pre_Had - raster(mydat,xmn=-180, xmx=180, ymn=-90, ymx=90,crs=+proj=longlat +datum=WGS84) This is probably a very clumsy (obviously wrong) way of doing it so any help/advice will be very much appreciated. Thanks!! Jorge The Scottish Association for Marine Science (SAMS) is registered in Scotland as a Company Limited by Guarantee (SC009292) and is a registered charity (9206). SAMS has an actively trading wholly owned subsidiary company: SAMS Research Services Ltd a Limited Company (SC224404). All Companies in the group are registered in Scotland and share a registered office at Scottish Marine Institute, Oban Argyll PA37 1QA. The content of this message may contain personal views which are not the views of SAMS unless specifically stated. Please note that all email traffic is monitored for purposes of security and spam filtering. As such individual emails may be examined in more detail. ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] Reproject raster from 0 360 to -180 180?
Thanks a lot! Exactly what I needed. Jorge -Original Message- From: r-sig-geo-boun...@r-project.org [mailto:r-sig-geo-boun...@r-project.org] On Behalf Of Kranstauber, Bart Sent: 10 July 2013 07:36 Cc: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] Reproject raster from 0 360 to -180 180? Use rotate in the package raster see for example: https://stat.ethz.ch/pipermail/r-sig-geo/2011-March/011155.html Bart On 07/09/2013 11:59 PM, Jorge Molinos wrote: Hello everybody, I have a raster that has longtitudes from 0 to 360 with the horizontal center at 180 longtitude http://www.freeimagehosting.net/lr9rb Pre_CCSM_r class : RasterLayer dimensions : 395, 320, 126400 (nrow, ncol, ncell) resolution : 1.125, 0.4294937 (x, y) extent : 0.50001, 360.5, -79.43527, 90.21475 (xmin, xmax, ymin, ymax) coord. ref. : +proj=longlat +datum=WGS84 data source : in memory names : layer values : 271.2439, 303.2426 (min, max) I want to transform this to a new raster with -180, 180 longtitude range centred at Greenwich meridian (0) for comparisons/analysis with other raster files. I have tried cutting the original raster into two (using the meridian 180 as cutting value) and piece them back together but got sort of a mosaic raster instead http://www.freeimagehosting.net/h5bxo lonlat - data.frame(xyFromCell(Pre_CCSM_r, 1:ncell(Pre_CCSM_r))) lonlat - cbind(lonlat, getValues(Pre_CCSM_r)) head(lonlat) x ygetValues(Pre_CCSM_r) 11.06251 90 271.3698 22.18751 90 271.3698 33.31251 90 271.3698 44.43751 90 271.3698 55.56251 90 271.3698 66.68751 90 271.3698 lolaA - as.matrix(lonlat[lonlat$x180,]) lolaB - as.matrix(lonlat[lonlat$x=180,]) mydata - rbind(lolaA,lolaB) mydat - matrix(mydata[,3], ncol=320,nrow=395,byrow=T) Pre_Had - raster(mydat,xmn=-180, xmx=180, ymn=-90, ymx=90,crs=+proj=longlat +datum=WGS84) This is probably a very clumsy (obviously wrong) way of doing it so any help/advice will be very much appreciated. Thanks!! Jorge The Scottish Association for Marine Science (SAMS) is registered in Scotland as a Company Limited by Guarantee (SC009292) and is a registered charity (9206). SAMS has an actively trading wholly owned subsidiary company: SAMS Research Services Ltd a Limited Company (SC224404). All Companies in the group are registered in Scotland and share a registered office at Scottish Marine Institute, Oban Argyll PA37 1QA. The content of this message may contain personal views which are not the views of SAMS unless specifically stated. Please note that all email traffic is monitored for purposes of security and spam filtering. As such individual emails may be examined in more detail. ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo The Scottish Association for Marine Science (SAMS) is registered in Scotland as a Company Limited by Guarantee (SC009292) and is a registered charity (9206). SAMS has an actively trading wholly owned subsidiary company: SAMS Research Services Ltd a Limited Company (SC224404). All Companies in the group are registered in Scotland and share a registered office at Scottish Marine Institute, Oban Argyll PA37 1QA. The content of this message may contain personal views which are not the views of SAMS unless specifically stated. Please note that all email traffic is monitored for purposes of security and spam filtering. As such individual emails may be examined in more detail. ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] R2WinBugs - getting TRAP errors in Winbugs
It is possible that N is large for this approach, but you have options using the CARBayes package and the BayesX interface in R, and INLA at www.r-inla.org. Code samples in ch. 10 in the 2nd edition of the book you refer to, ch. 10, on www.asdar-book.org. If there are spatially patterned omitted covariates, going through Bayesian inference may be serious overkill, unless you really need the N marginals on the spatially structured random effects rather than just the point smooth values in your Poisson regession; does glm() or some GLMM get you there with less trouble? Might the hglm package help? Hope this helps, Roger -- Roger Bivand NHH Norwegian School of Economics Helleveien 30, 5045 Bergen, Norway roger.biv...@nhh.no Fra: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-project.org] p#229; vegne av James Rooney [roone...@tcd.ie] Sendt: 9. juli 2013 11:46 Til: r-sig-geo@r-project.org Emne: [R-sig-Geo] R2WinBugs - getting TRAP errors in Winbugs Hi all, I am trying to implement the WinBUGS spatial conditional autoregression model on page 11.11 of Applied Spatial Data Analysis in R. I have about 3300 polygons with about 17,000 adjacencies in the set. I have changed the model only by removing the beta term as, for now, I don't have any variables to include - I want simply to do a spatially smoothed model with no covariates. Anyhow the code runs fine under R - but I am constantly getting a Trap Error in Winbugs - Index out of range. My BUGs code looks like this: model { for(i in 1:N) { observed[i]~dpois(mu[i]) log(theta[i])-alpha + u[i] + v[i] mu[i]-expected[i]*theta[i] u[i] ~dnorm(0,precu) } v[1:N]~car.normal(adj[],weights[],num[],precv) alpha ~dflat() precu ~dgamma (0.001, 0.001) precv ~dgamma (0.001, 0.001) } and my R code like this - (I've deliberately kept the iterations low in trying to figure out the problem but I get the error even within 1000 iterations). nb-poly2nb(EDdata2,queen=T) nb.w-nb2listw(nb,zero.policy=T,style=B) nbBugs-listw2WB(nb.w) BugsDir-C:/Program Files/WinBUGS14/ N-length(EDdata2$nm_tt_c) d-list(N = N, observed =EDdata2$nm_tt_c, expected = EDdata2$tot_exp, adj=nbBugs$adj, weights=nbBugs$weights, num=nbBugs$num) inits-list(list(u=rep(0,N),v=rep(0,N),alpha=0,precu=0.001,precv=0.001)) MCMCres-bugs(data=d,inits=inits,bugs.directory=BugsDir,parameters.to.save=c(theta,alpha),n.chains=1,n.iter=1000,n.burnin=500,n.thin=1, model.file=ALS_spatial_CAR.txt) I don't know if WinBUGS falls under the remit here ?? But was hoping someone might have some idea whats causing my TRAP errors as I am at a loss. Many thanks all, James ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] Using gDistance under Linux causes R crash.
To test whether GEOS and rgeos are installed correctly, run: library(rgeos) library(testthat) set_do_poly_check(FALSE) test_package(rgeos) set_do_poly_check(TRUE) -- Roger Bivand NHH Norwegian School of Economics Helleveien 30, 5045 Bergen, Norway roger.biv...@nhh.no Fra: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-project.org] p#229; vegne av Roger Bivand [roger.biv...@nhh.no] Sendt: 9. juli 2013 7:57 Til: Ferdinand Bersse Kopi: r-sig-geo@r-project.org Emne: Re: [R-sig-Geo] Using gDistance under Linux causes R crash. On Tue, 9 Jul 2013, Ferdinand Bersse wrote: Dears, I've been trying to use gDistance from rgeos package to generate a distance matrix between all features of a shp file, i.e. using gDistance(shpfile, shpfile, byid=TRUE) in R 2.15 and it always makes R to crash. You should always provide a reproducible example of claims of crashing R. There is no way anyone can advise you if you do not do this, because guesswork is no help. Please also see the posting guide for definitions of crash - a crash is only when R exits to the shell. You will have to remove the possibility that rgeos and GEOS are wrongly installed, first by removing the rpm (I doubt that geos-devel is sufficient) and installing GEOS from source. Then you must show how your read the shapefile (use rgdal only), and it will be best if you show your code in relation to a small shapefile that is available. Roger I am using a Red Hat server with R 2.15 (can not change R version now in the server). Any insights about what may be going on or any other option that calculates distances from border to border of spatial features (not from centroids to centroids)? Many thanks! Ferd. [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Roger Bivand Department of Economics, NHH Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: roger.biv...@nhh.no ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[R-sig-Geo] Imputation of missing values
Hi all, I would like to impute missing values in a data set based on the distribution of the other values of the variable. Imagine that 30 % of the values = 1, 20 % = 2 and 50 % = 3, in effect I'd like to do the following : df$var[df$var==NA]-1 # for 30 % of the NA occurrences # df$var[df$var==NA]-2 # for 20 % of the NA occurrences # df$var[df$var==NA]-3 # for 50 % of the NA occurrences # Can anybody help ? John ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] R2WinBugs - getting TRAP errors in Winbugs
Thanks for the various options. I have tried using the CARBayes package however several of the functions (for example the .bymGAR function) were giving me this error: Error in chol2inv(chol(Q.current)) : error in evaluating the argument 'x' in selecting a method for function 'chol2inv': Error in chol.default(Q.current) : the leading minor of order 8 is not positive definite Thanks for the other options I will look into them. James From: Roger Bivand [roger.biv...@nhh.no] Sent: 10 July 2013 10:25 To: James Rooney; r-sig-geo@r-project.org Subject: SV: R2WinBugs - getting TRAP errors in Winbugs It is possible that N is large for this approach, but you have options using the CARBayes package and the BayesX interface in R, and INLA at www.r-inla.org. Code samples in ch. 10 in the 2nd edition of the book you refer to, ch. 10, on www.asdar-book.org. If there are spatially patterned omitted covariates, going through Bayesian inference may be serious overkill, unless you really need the N marginals on the spatially structured random effects rather than just the point smooth values in your Poisson regession; does glm() or some GLMM get you there with less trouble? Might the hglm package help? Hope this helps, Roger -- Roger Bivand NHH Norwegian School of Economics Helleveien 30, 5045 Bergen, Norway roger.biv...@nhh.no Fra: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-project.org] p#229; vegne av James Rooney [roone...@tcd.ie] Sendt: 9. juli 2013 11:46 Til: r-sig-geo@r-project.org Emne: [R-sig-Geo] R2WinBugs - getting TRAP errors in Winbugs Hi all, I am trying to implement the WinBUGS spatial conditional autoregression model on page 11.11 of Applied Spatial Data Analysis in R. I have about 3300 polygons with about 17,000 adjacencies in the set. I have changed the model only by removing the beta term as, for now, I don't have any variables to include - I want simply to do a spatially smoothed model with no covariates. Anyhow the code runs fine under R - but I am constantly getting a Trap Error in Winbugs - Index out of range. My BUGs code looks like this: model { for(i in 1:N) { observed[i]~dpois(mu[i]) log(theta[i])-alpha + u[i] + v[i] mu[i]-expected[i]*theta[i] u[i] ~dnorm(0,precu) } v[1:N]~car.normal(adj[],weights[],num[],precv) alpha ~dflat() precu ~dgamma (0.001, 0.001) precv ~dgamma (0.001, 0.001) } and my R code like this - (I've deliberately kept the iterations low in trying to figure out the problem but I get the error even within 1000 iterations). nb-poly2nb(EDdata2,queen=T) nb.w-nb2listw(nb,zero.policy=T,style=B) nbBugs-listw2WB(nb.w) BugsDir-C:/Program Files/WinBUGS14/ N-length(EDdata2$nm_tt_c) d-list(N = N, observed =EDdata2$nm_tt_c, expected = EDdata2$tot_exp, adj=nbBugs$adj, weights=nbBugs$weights, num=nbBugs$num) inits-list(list(u=rep(0,N),v=rep(0,N),alpha=0,precu=0.001,precv=0.001)) MCMCres-bugs(data=d,inits=inits,bugs.directory=BugsDir,parameters.to.save=c(theta,alpha),n.chains=1,n.iter=1000,n.burnin=500,n.thin=1, model.file=ALS_spatial_CAR.txt) I don't know if WinBUGS falls under the remit here ?? But was hoping someone might have some idea whats causing my TRAP errors as I am at a loss. Many thanks all, James ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[R-sig-Geo] help for lattice plot
Dear All, How can I plot some different plots in one page in lattice like par(mfrow=c(2,2)) in graphics package? p1-bwplot(m~PRED,data=PRED) p2-bwplot(R~Residual,data=PRED) xyplot(obs~PRED.v|method,data=PRED.v) histogram(~PRED.v|method,data=PRED.v) Thanks, Saman. -- Saman Monfared Msc, Department of Statistics, Shiraz University, Shiraz 71454, Iran Email: samanmonfar...@gmail.com Tel: +98 917 5305167 ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] help for lattice plot
Have you tried `grid.arrange` from `gridExtra` package? http://stackoverflow.com/questions/6681145/how-can-i-arrange-an-arbitrary-number-of-ggplots-using-grid-arrange Cheers, Roman On Wed, Jul 10, 2013 at 2:14 PM, Saman Monfared samanmonfar...@gmail.comwrote: Dear All, How can I plot some different plots in one page in lattice like par(mfrow=c(2,2)) in graphics package? p1-bwplot(m~PRED,data=PRED) p2-bwplot(R~Residual,data=PRED) xyplot(obs~PRED.v|method,data=PRED.v) histogram(~PRED.v|method,data=PRED.v) Thanks, Saman. -- Saman Monfared Msc, Department of Statistics, Shiraz University, Shiraz 71454, Iran Email: samanmonfar...@gmail.com Tel: +98 917 5305167 ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- In God we trust, all others bring data. [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] help for lattice plot
?print.trellis Next time use the R-help mailing list (https://stat.ethz.ch/mailman/listinfo/r-help) for these questions. Best, Oscar. Saman Monfared samanmonfar...@gmail.com writes: Dear All, How can I plot some different plots in one page in lattice like par(mfrow=c(2,2)) in graphics package? p1-bwplot(m~PRED,data=PRED) p2-bwplot(R~Residual,data=PRED) xyplot(obs~PRED.v|method,data=PRED.v) histogram(~PRED.v|method,data=PRED.v) Thanks, Saman. ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[R-sig-Geo] length polygons / nrow data
Hello, I' m still beginner (two days of practice), and I failed in the example script from the ASFAR Book, about SpatialPolygonsDataFrame (example page 45). Can you help me? Sincerely state.map-map(state,plot=FALSE,fill=TRUE) IDs-sapply(strsplit(state.map$names,:),function(x)x[1]) state.sp-map2SpatialPolygons(state.map,IDs=IDs, + proj4string=CRS(+proj=longlat+ellps=WGS84)) sat-read.table(C:/Users/Thomas AUBINEAU/Desktop/state.sat.data_mod.txt,row.names=5, + header=TRUE) str(sat) 'data.frame': 52 obs. of 4 variables: $ oname : Factor w/ 52 levels ala,alaska,..: 1 2 3 4 5 6 7 9 8 10 ... $ vscore: int 561 516 524 563 497 536 510 503 494 499 ... $ mscore: int 555 514 525 556 514 540 509 497 478 498 ... $ pc: int 9 50 34 6 49 32 80 67 77 53 ... id-match(row.names(sat),sapply(slot(state.sp,polygons), + function(x)slot(x,ID))) row.names(sat)[is.na(id)] [1] alaska hawaii usa state.spdf-SpatialPolygonsDataFrame(state.sp,sat) Error: length(Sr@polygons) == nrow(data) is not TRUE Thomas AUBINEAU Responsable technique GDS 35 ZA Atalante Champeaux 35042 RENNES CEDEX 0223482600 / 0623258789 [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Re: [R-sig-Geo] length polygons / nrow data
On Wed, 10 Jul 2013, Thomas AUBINEAU wrote: Hello, I' m still beginner (two days of practice), and I failed in the example script from the ASFAR Book, about SpatialPolygonsDataFrame (example page 45). Assuming that you did download the code for that chapter (2, 1st edition I assume) from http://www.asdar-book.org/book/cm_mod.R, are you in chunk 73? All the code is run daily, so it does work; for future reference, please paste the offending line of code and error message into your question. Roger Can you help me? Sincerely state.map-map(state,plot=FALSE,fill=TRUE) IDs-sapply(strsplit(state.map$names,:),function(x)x[1]) state.sp-map2SpatialPolygons(state.map,IDs=IDs, + proj4string=CRS(+proj=longlat+ellps=WGS84)) sat-read.table(C:/Users/Thomas AUBINEAU/Desktop/state.sat.data_mod.txt,row.names=5, + header=TRUE) str(sat) 'data.frame': 52 obs. of 4 variables: $ oname : Factor w/ 52 levels ala,alaska,..: 1 2 3 4 5 6 7 9 8 10 ... $ vscore: int 561 516 524 563 497 536 510 503 494 499 ... $ mscore: int 555 514 525 556 514 540 509 497 478 498 ... $ pc: int 9 50 34 6 49 32 80 67 77 53 ... id-match(row.names(sat),sapply(slot(state.sp,polygons), + function(x)slot(x,ID))) row.names(sat)[is.na(id)] [1] alaska hawaii usa state.spdf-SpatialPolygonsDataFrame(state.sp,sat) Error: length(Sr@polygons) == nrow(data) is not TRUE Thomas AUBINEAU Responsable technique GDS 35 ZA Atalante Champeaux 35042 RENNES CEDEX 0223482600 / 0623258789 [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo -- Roger Bivand Department of Economics, NHH Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: roger.biv...@nhh.no ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[R-sig-Geo] writeRaster to ascii file (.asc)
Dear list members, I am trying to export a raster file to a ascii file (.asc) but the min and max values are not the same. Any idea why? bio1res class : RasterLayer dimensions : 382, 407, 155474 (nrow, ncol, ncell) resolution : 0.00833, 0.00833 (x, y) extent : -85.95, -82.55833, 8.041667, 11.225 (xmin, xmax, ymin, ymax) coord. ref. : NA data source : in memory names : bio1_23 values : 47, 272 (min, max) writeRaster(bio1res, filename=temp.asc, format=ascii,overwrite=TRUE) class : RasterLayer dimensions : 382, 407, 155474 (nrow, ncol, ncell) resolution : 0.00833, 0.00833 (x, y) extent : -85.95, -82.55833, 8.041667, 11.225 (xmin, xmax, ymin, ymax) coord. ref. : NA data source : /Users/manuelspinola/Dropbox/DistribucioÌn de especies/World_Clim_Costa_Rica/temp.asc names : temp values : -2147483648, 2147483647 (min, max) Best, Manuel -- *Manuel SpÃnola, Ph.D.* Instituto Internacional en Conservación y Manejo de Vida Silvestre Universidad Nacional Apartado 1350-3000 Heredia COSTA RICA mspin...@una.ac.cr mspinol...@gmail.com Teléfono: (506) 2277-3598 Fax: (506) 2237-7036 Personal website: Lobito de rÃo https://sites.google.com/site/lobitoderio/ Institutional website: ICOMVIS http://www.icomvis.una.ac.cr/ [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[R-sig-Geo] help for show.vgms
Dear all, How can I add text and change color of variograms in show.vgms()? Best, Saman. -- Saman Monfared Msc, Department of Statistics, Shiraz University, Shiraz 71454, Iran Email: samanmonfar...@gmail.com Tel: +98 917 5305167 ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo
[R-sig-Geo] SPGWR - gw.adapt() command question
Hello all, I am doing some exploratory analysis with adaptive and fixed kernels in the SPGWR package. I am hoping to glean further insight from someone who has a better understanding of the gw.adapt(dp, fp, quant, longlat=FALSE) command. I understand 'quant' is proportion of data points to include in the weight. Is there a common trade off moving from 0 to 1? The bandwidth it assigns are consistently much larger and perform significantly worse than when employing a fixed bandwidth, which seems counter-intuitive to much of the literature I am reading. As the proportion I use increases, some of the bandwidths are reaching as high as 200 km, which I know cannot be correct as the geographical area is no more than 30 square kilometers. Any insight is very much appreciated. I am very aware of the warnings and pitfalls of GWR ; I am simply looking to have a better understanding of the intuition behind this package and command specifically. Thanks very much for your time! Best, Paul Old Dominion University [[alternative HTML version deleted]] ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo