[R-sig-Geo] Geographically weighted regression

bi@bi@iu m@iii@g oii whu@edu@c@ bi@bi@iu m@iii@g oii whu@edu@c@
Sat Feb 23 08:22:24 CET 2019


Hi,
The formula is wrongly specified, Ziel~ as.factor(Var1) + log(Var2, base = exp(1)) + Var3, use the corresponding var-names only.

As I understand, you want to do some calculations with the variables, and you can process them in the data frame before using it in this command, not in the formula.

Binbin




Dr Binbin Lu
Lecturer in School of Remote Sensing and Information Engineering, Wuhan University
Email: binbinlu using whu.edu.cn
 
From: f-c-b
Date: 2019-02-22 20:37
To: r-sig-geo
Subject: [R-sig-Geo] Geographically weighted regression
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

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list