[R-sig-Geo] Can I use covariates in addition to spatial coordinates for 'qreglwr' in the McSpatial package?

Joelle k. Akram chino_tones at hotmail.com
Thu Feb 22 06:58:02 CET 2018


hi all,


The formatting in my original post is not correct.

Please see my post in the correct format:



Greetings all,


I am trying to run the following function spatial regression:

https://rdrr.io/cran/McSpatial/man/qreglwr.html


Based on the examples given below the weblink, the function is run with spatial coordinates:

fit <- qreglwr(LNDENS~LONGITUDE+LATITUDE,taumat=c(.10,.50,.90),window=.20,data=cookdata)


And there is also an example, where it is run without spatial coordinates (i.e., only covariates) :

fit1 <- qreglwr(LNDENS~DCBD,taumat=c(.10,.50,.90),window=.30,kern="rect",data=cookdata)



In my problem, I am thinking along the lines of GWR where we specify both covariates and spatial coords.

But I do not see it possible in this function.


Unless I  am missing something, I believe we cannot do the following since the function does may not differentiate between

a spatial coord. variable and a covariate:


fit1 <- qreglwr(LNDENS~DCBD+LONGITUDE+LATITUDE,taumat=c(.10,.50,.90),window=.30,kern="rect",data=cookdata)

Any insights are welcome.
cheers.

data: Data Sets - R Package Documentation<https://rdrr.io/r/utils/data.html>
rdrr.io
Loads specified data sets, or list the available data sets.


window: Time Windows - R Package Documentation<https://rdrr.io/r/stats/window.html>
rdrr.io
window is a generic function which extracts the subset of the object x observed between the times start and end. If a frequency is specified, the series is then re ...


c: Combine Values into a Vector or List - rdrr.io<https://rdrr.io/r/base/c.html>
rdrr.io
This is a generic function which combines its arguments. The default method combines its arguments to form a vector. All arguments are coerced to a common type which ...


window: Time Windows - R Package Documentation<https://rdrr.io/r/stats/window.html>
rdrr.io
window is a generic function which extracts the subset of the object x observed between the times start and end. If a frequency is specified, the series is then re ...


c: Combine Values into a Vector or List - rdrr.io<https://rdrr.io/r/base/c.html>
rdrr.io
This is a generic function which combines its arguments. The default method combines its arguments to form a vector. All arguments are coerced to a common type which ...


data: Data Sets - R Package Documentation<https://rdrr.io/r/utils/data.html>
rdrr.io
Loads specified data sets, or list the available data sets.


data: Data Sets - R Package Documentation<https://rdrr.io/r/utils/data.html>
rdrr.io
Loads specified data sets, or list the available data sets.


c: Combine Values into a Vector or List - rdrr.io<https://rdrr.io/r/base/c.html>
rdrr.io
This is a generic function which combines its arguments. The default method combines its arguments to form a vector. All arguments are coerced to a common type which ...




________________________________
From: R-sig-Geo <r-sig-geo-bounces at r-project.org> on behalf of Joelle k. Akram <chino_tones at hotmail.com>
Sent: February 21, 2018 2:31 PM
To: r-sig-geo at r-project.org
Subject: [R-sig-Geo] Can I use covariates in addition to spatial coordinates for 'qreglwr' in the McSpatial package?

Greetings all,


I am trying to run the following function spatial regression:

https://rdrr.io/cran/McSpatial/man/qreglwr.html


Based on the examples given below the weblink, the function is run with spatial coordinates:

fit <- qreglwr<https://rdrr.io/cran/McSpatial/man/qreglwr.html>(LNDENS~LONGITUDE+LATITUDE,taumat=c<https://rdrr.io/r/base/c.html>(.10,.50,.90),window<https://rdrr.io/r/stats/window.html>=.20,data<https://rdrr.io/r/utils/data.html>=cookdata<https://rdrr.io/cran/McSpatial/man/cookdata.html>)


And it is run without spatial coordinates (i.e., only covariates) :

fit1 <- qreglwr<https://rdrr.io/cran/McSpatial/man/qreglwr.html>(LNDENS~DCBD,taumat=c<https://rdrr.io/r/base/c.html>(.10,.50,.90),window<https://rdrr.io/r/stats/window.html>=.30,kern="rect",data<https://rdrr.io/r/utils/data.html>=cookdata<https://rdrr.io/cran/McSpatial/man/cookdata.html>)

In my problem, I am thinking along the lines of GWR where we specify both covariates and spatial coords.

But I do not see it in this function.


Unless I  am missing something, I believe we cannot do the following since the function does may not differentiate between

a spatial coord. variable and a covariate:


fit1 <- qreglwr<https://rdrr.io/cran/McSpatial/man/qreglwr.html>(LNDENS~DCBD+LONGITUDE+LATITUDE,taumat=c<https://rdrr.io/r/base/c.html>(.10,.50,.90),window<https://rdrr.io/r/stats/window.html>=.30,kern="rect",data<https://rdrr.io/r/utils/data.html>=cookdata<https://rdrr.io/cran/McSpatial/man/cookdata.html>)

Any insights are welcome.
cheers.

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
R-sig-Geo Info Page - SfS � Seminar for Statistics | ETH ...<https://stat.ethz.ch/mailman/listinfo/r-sig-geo>
stat.ethz.ch
A mailing list for discussing the development and use of R functions and packages for handling and analysis of spatial, and particularly geographical, data.




	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list