[R-sig-Geo] Geographically weighted regression

Sarah Goslee @@r@h@go@|ee @end|ng |rom gm@||@com
Fri Feb 22 19:50:44 CET 2019


The first step should be to look at

str(Daten90)
str(Daten10)

and if that doesn't solve the problem, then consider a reproducible
example, or at the very least posting the results of the above to this
list.

Sarah

On Fri, Feb 22, 2019 at 7:38 AM <f-c-b using web.de> wrote:
>
> Dear all,
>
> I am currently working out a geographically weighted regression, in which 90% of the data set the model should be calculated and for 10% of the values to be predicted. For the prediction I use the function gwr.predict from the package GWModel:
>
>  Erg<-gwr.predict(formula=Ziel~ as.factor(Var1) + log(Var2, base = exp(1)) + Var3, data = Daten90,predictdata = Daten10,bw = bwG, kernel = "gaussian",adaptive = FALSE, p = 2, theta = 0, longlat = FALSE)
>
> I always get this error, although Daten10 and Daten90 have the same structure:
> Error in gwr.predict(formula = Ziel~ as.factor(Var1) + log(Var2, base = exp(1)) + Var3, :
> All the independent variables should be included in the predictdata.
>
> Can you tell me what the problem with this code is?
> Or is there any other way for a GWR and the prediction?
>
> Thank you,
> Christoph
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo



-- 
Sarah Goslee (she/her)
http://www.numberwright.com



More information about the R-sig-Geo mailing list