Re: [R-sig-Geo] Predict function for splm object

2019-06-05 Thread Justin Schon
Thank you for the confirmation! On Wed, Jun 5, 2019 at 11:07 AM Roger Bivand wrote: > On Wed, 5 Jun 2019, Justin Schon wrote: > > > Hello all, > > > > I've seen that a lot of people ask about this, but I am interested in > > whether there may be any developments here. Is there a predict

Re: [R-sig-Geo] Predict function for splm object

2019-06-05 Thread Roger Bivand
On Wed, 5 Jun 2019, Justin Schon wrote: Hello all, I've seen that a lot of people ask about this, but I am interested in whether there may be any developments here. Is there a predict function that works for splm objects? Note that I am not referring to spLM objects, which often comes up for

[R-sig-Geo] Predict function for splm object

2019-06-05 Thread Justin Schon
Hello all, I've seen that a lot of people ask about this, but I am interested in whether there may be any developments here. Is there a predict function that works for splm objects? Note that I am not referring to spLM objects, which often comes up for me when I google this question. I found a

Re: [R-sig-Geo] Predict gam in a loop on multiple raster stacks and keeping identical layer names

2015-05-06 Thread Kristin
Thank you very much for the help Robert! Works wonders. -Such a simple addition to the loop to fix the naming of layers :). This raster package is so brilliant. atb, Kristin -- View this message in context:

[R-sig-Geo] Predict gam in a loop on multiple raster stacks and keeping identical layer names

2015-05-05 Thread Kristin
I have a gam model with predictor names (variables) par, chl, sst, lat and lon. The model I called gammodel. Then I have predictors for 96 day period in raster stacks: stackpar, stackchl, stacksst -that is 3 different raster stacks - each one with 96 layers. lat and lon are fixed in time and are

Re: [R-sig-Geo] Predict gam in a loop on multiple raster stacks and keeping identical layer names

2015-05-05 Thread Robert J. Hijmans
Kristin, I think you can do something like this: lst - list() for(i in 1:96) { Predictors - stack(stackchl[[i]], stacksst[[i]], stackpar[[i]], lat, lon) names(Predictos) - c('chl', 'sst', 'par', 'lat', 'lon') lst[[i]] - predict(Predictors, gammodel, na.rm=TRUE, type=response) } s -

[R-sig-Geo] Predict a gam model with factors to a raster

2014-11-12 Thread Thiago Cesar Lima Silveira
Hi, I edited the same question to a better understanding. I hope someone can help with the issue about a prediction using a model with factors in package ‘raster'. I would like to do the same that shows this code from BRT vignette: Example BRT library(dismo)

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Dhyey Bhatpuria
, Research Fellow, Space Applications Centre, ISRO, Ahmedabad, India - Message: 5 Date: Mon, 10 Nov 2014 16:43:46 -0200 From: Thiago Cesar Lima Silveira thiagoclsilve...@yahoo.com.br To: r-sig-geo@r-project.org Subject: [R-sig-Geo] Predict GAM model with categorical

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Thiago Cesar Lima Silveira
Hi, Sorry, I've posted the code with some mistakes. Consider the code below. I've one response, and two predictors, v1 (numeric) and v2 (factor). So, I have just one predictor which is possible to have a raster, the other is a categorical variable. How to predict to rasters considering

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-11 Thread Thiago Silveira
Hi Dhyey Bhatpuria, Sorry, I've posted the code with some mistakes. Consider the code below. I've one response, and two predictors, v1 (numeric) and v2 (factor). So, I have just one predictor which is possible to have a raster, the other is a categorical variable. How to predict to rasters

[R-sig-Geo] Predict GAM model with categorical predictors

2014-11-10 Thread Thiago Cesar Lima Silveira
Hi, I'm experiencing some problems to predict a gam model with factor as predictor to raster stack. I wrote an example code to illustrate the problem. This is the error message when I try to predict with a model with factors: 'Error in `[.data.frame`(blockvals, , f[j]) : undefined columns

Re: [R-sig-Geo] Predict GAM model with categorical predictors

2014-11-10 Thread Thiago Cesar Lima Silveira
## Disregard the code sent before, this is the right Hi, I'm experiencing some problems to predict a gam model with factor as predictor to raster stack. I wrote an example code to illustrate the problem. This is the error message when I try to predict with a model with factors: 'Error in

[R-sig-Geo] Predict and spml

2013-08-01 Thread Olivier Francois
Hello, I apologize if this question has already been answered. I couldn't find anything after extensive search. I ran a spatial panel model on a subset of my data, and would like to use the resulting splm object to predict the fitted values for the rest of the data. The predict command

[R-sig-Geo] predict function of regressors in the raster package

2013-04-04 Thread Bouwmeester, Hein
Hi, I would like to make a raster, based on the regression coefficients with 5 other rasters (Predictors). In theory this should be easy using the predict function of the raster package (http://cran.r-project.org/web/packages/raster/raster.pdf). But I fail to get it to work. First I fit a

Re: [R-sig-Geo] predict function of regressors in the raster package

2013-04-04 Thread Jesse Berman
Hi Hein, I'm not sure if this will help, but one thing to check is that your prediction grid has covariate data for each of the 40,000 cells. If a large number of cells have 'NA' as data values, then sometimes the prediction will not work. Offhandedly, it strikes me that ycoord may be limited

Re: [R-sig-Geo] predict function of regressors in the raster package

2013-04-04 Thread Robert J. Hijmans
Hein, I think this problem goes away if you use a clean formula, like this: model - glm(t0~ycoord+prec+tempmean+tempmax+tempmin, family=binomial(link=logit), data=c3p) Robert On Thu, Apr 4, 2013 at 7:42 AM, Jesse Berman berman.je...@gmail.com wrote: Hi Hein, I'm not sure if this will

[R-sig-Geo] predict {dismo}

2012-10-31 Thread Jaime Burbano Girón
Hi dear list members. I'm trying to predict from a maxent() model constructed with 19 bio-variables from worldclim, a higher resolution model (30m) with 19 bio-variables constructed from Tps() interpolation for climatic station data. Hear is my short script: #each one corresponds to a raster

Re: [R-sig-Geo] predict {dismo}

2012-10-31 Thread Robert J. Hijmans
Jaime, Please do not cross-post your questions, and provide sessionInfo() results when reporting something that does not work. I think this error means that you do not have maxent.jar installed. What does maxent() return? Robert On Wed, Oct 31, 2012 at 4:14 AM, Jaime Burbano Girón

Re: [R-sig-Geo] Predict

2012-03-31 Thread Roger Bivand
On Fri, 30 Mar 2012, Smit, M.J. wrote: Dear list members, I want to do a scenario analysis: run a regression on the real data, then make some changes to that, and do a prediction based on the changed data. There is a predict command under sarlm for this, and it works. However, I have two

[R-sig-Geo] Predict

2012-03-30 Thread Smit, M.J.
Dear list members, I want to do a scenario analysis: run a regression on the real data, then make some changes to that, and do a prediction based on the changed data. There is a predict command under sarlm for this, and it works. However, I have two questions. -

Re: [R-sig-Geo] Predict leads to 'non-conformable arguments'

2012-03-14 Thread Roger Bivand
On Tue, 13 Mar 2012, Smit, M.J. wrote: Dear list, I'm trying to do a scenario analysis by changing a few values in the dataset, and running 'predict' from spdep both before and after. However, I get 'non-comformable arguments', even when I just add the old dataset as 'newdata='. What is

Re: [R-sig-Geo] Predict leads to 'non-conformable arguments'

2012-03-14 Thread Roger Bivand
On Wed, 14 Mar 2012, Roger Bivand wrote: On Tue, 13 Mar 2012, Smit, M.J. wrote: Dear list, I'm trying to do a scenario analysis by changing a few values in the dataset, and running 'predict' from spdep both before and after. However, I get 'non-comformable arguments', even when I just add

[R-sig-Geo] Predict leads to 'non-conformable arguments'

2012-03-13 Thread Smit, M.J.
Dear list, I'm trying to do a scenario analysis by changing a few values in the dataset, and running 'predict' from spdep both before and after. However, I get 'non-comformable arguments', even when I just add the old dataset as 'newdata='. What is happening? My lagsarlm runs fine; so does

Re: [R-sig-Geo] predict() LDL error

2011-07-18 Thread Matevž Pavlič
:15 AM To: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] predict() LDL error to remove duplicates in DF you need to replace it: DF = remove.duplicates(DF, zero=0, remove.second = TRUE) zerodist(DF) On 07/15/2011 10:23 AM, Matevž Pavlič wrote: Hi, thanks for your time I am sure

Re: [R-sig-Geo] predict() LDL error

2011-07-18 Thread Matevž Pavlič
...and attachement... r, m -Original Message- From: r-sig-geo-boun...@r-project.org [mailto:r-sig-geo-boun...@r-project.org] On Behalf Of Matevž Pavlič Sent: Monday, July 18, 2011 8:47 AM To: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] predict() LDL error Hi Edzer, thanks

Re: [R-sig-Geo] predict() LDL error

2011-07-18 Thread Matevž Pavlič
: Monday, July 18, 2011 8:58 AM To: Matev¾ Pavliè Subject: Re: [R-sig-Geo] predict() LDL error Hi Matev¾ try: print(spplot(z, zcol=which(names(z)==0.pred)), col.regions=terrain.colors(64), contour=T, pretty=T, cuts=8, key.space=right) Greets Caspar 2011/7/18 Matev¾ Pavliè

Re: [R-sig-Geo] predict() LDL error

2011-07-18 Thread Matevž Pavlič
Hi, thanks for the help. I renamed it to letters and it works perfectly now. Thanks again for your time, m From: caspar hallmann [mailto:caspar.hallm...@gmail.com] Sent: Monday, July 18, 2011 9:44 AM To: Matevž Pavlič Cc: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] predict

Re: [R-sig-Geo] predict() LDL error

2011-07-18 Thread Matevž Pavlič
of that column (prediction) I hope I explained it ok, if not i'll try more… Thanks for the hlep, m From: romu...@gmail.com [mailto:romu...@gmail.com] On Behalf Of Roman Luštrik Sent: Monday, July 18, 2011 11:21 AM To: Matevž Pavlič Subject: Re: [R-sig-Geo] predict() LDL error Oj

Re: [R-sig-Geo] predict() LDL error

2011-07-15 Thread Matevž Pavlič
the same...shouln't it remove the duplicates? thanks, m -Original Message- From: r-sig-geo-boun...@r-project.org [mailto:r-sig-geo-boun...@r-project.org] On Behalf Of Edzer Pebesma Sent: Thursday, July 14, 2011 11:25 PM To: r-sig-geo@r-project.org Subject: Re: [R-sig-Geo] predict() LDL

[R-sig-Geo] predict() LDL error

2011-07-14 Thread Matevž Pavlič
Hi all, i am trying to use categorical kriging for prediction of soil classes in an area. I am pretty new to using cat. kriging in R soI probably am making some beginers mistakes. Attached is a reproducable sample with sample data. When i try to use predict() i geta n error- I am

Re: [R-sig-Geo] predict() LDL error

2011-07-14 Thread Edzer Pebesma
The error message is an indication that you're predicting (kriging) with a singular covariance matrix. The most frequent reasons for this are duplicate observations [1] or perfect correlation in the coregionalization model [2]. For [1], see ?remove.duplicates, for [2] see argument correct.diagonal

Re: [R-sig-Geo] predict a map from point data

2011-03-01 Thread Sadz A
around this. Thank you for your response sadz From: Tom Gottfried tom.gottfr...@wzw.tum.de To: r-sig-geo@r-project.org Sent: Mon, 28 February, 2011 9:41:25 Subject: Re: [R-sig-Geo] predict a map from point data Hi Sadz, Am 28.02.2011 01:54, schrieb Sadz A: Hi

Re: [R-sig-Geo] predict a map from point data

2011-02-28 Thread Tom Gottfried
Hi Sadz, Am 28.02.2011 01:54, schrieb Sadz A: Hi, I'm trying to predict the distribution of timber over an area, I have point location data- so it would make sense to use a krigging to interpolate the data over the whole map. Unfortunately the krigging predictions are pretty bad.

[R-sig-Geo] predict a map from point data

2011-02-27 Thread Sadz A
Hi, I'm trying to predict the distribution of timber over an area, I have point location data- so it would make sense to use a krigging to interpolate the data over the whole map. Unfortunately the krigging predictions are pretty bad. I have now got environmental data for my study site and