[R] Using Moran.I

Janet Choate jsc.eco at gmail.com
Fri Aug 15 06:44:29 CEST 2014


Dear R community,
i am attempting to use Moran.I for the first time, and am not quite sure on
the inputs needed....
i have loaded the ape library.

i have a data frame that includes concentrations of nutrients (no3, nh4,
po4) and the percentage of different land use types (urb, ag, ud, comm, sr,
dp, park) contributing to the locations where the measurements were taken.
it (fwr) looks like this (but longer):

fwr
     no3   nh4    po4  urb   ag   ud comm   sr   dp park
1 558.77 10.79 147.95 0.50 0.09 0.37 0.17 0.15 0.18 0.05
2 403.70  9.27  25.11 0.49 0.09 0.37 0.16 0.16 0.17 0.05
3 365.77  9.61 127.22 0.46 0.09 0.40 0.15 0.15 0.16 0.04
4  93.95  1.78  11.34 0.45 0.08 0.42 0.13 0.18 0.14 0.06
5  63.20 21.44  47.17 0.47 0.08 0.40 0.13 0.19 0.15 0.06
6  14.80  4.47  27.06 0.49 0.07 0.38 0.13 0.21 0.15 0.06

i was asked to do multiple regression, and plot the residuals:
no3.mr = lm(no3 ~ urb+ag+ud+comm+sr+dp+park)

then asked to do a Moran's I on the residuals.

i am not sure about the input necessary to do a Moran's I. do i need
coordinate locations? or/and how do i assign the weights?
i think i assign the weights to the land use types -
how would i use the results of the multiple regression (no3.mr) to perform
the Morans.I on the residuals?

thank you for any assistance,
Janet

	[[alternative HTML version deleted]]



More information about the R-help mailing list