[R-sig-Geo] CAR model related negative interaction variable and threshold

Roger Bivand Roger.Bivand at nhh.no
Thu Jul 25 07:36:08 CEST 2013


On Thu, 25 Jul 2013, Li, Han wrote:

> Dear list,
>
> I am experiencing some difficulty with a negative interaction variable 
> in my CAR models. Any insight will be highly appreciated. My CAR model 
> result from R is:
>
> Call: spautolm(formula = group ~ intersect * popu_dense, data = tabr, 
> listw = tabr_neighbor_k1_max_wb, family = "CAR")
>
> Residuals:
> Min          1Q          Median   3Q         Max
> -1.02934 -0.25278 -0.05858 0.29985 0.93158
>
> Coefficients:
>                                  Estimate      Std. Error       z value    Pr(>|z|)
> (Intercept)                  5.9235e-02  3.7017e-02    1.6002    0.109552
> intersect                     7.7819e-02  1.4418e-02    5.3974    6.762e-08
> popu_dense                4.8762e-05  1.5287e-05    3.1898    0.001424
> intersect:popu_dense -1.0898e-05  3.7201e-06   -2.9295    0.003395
>
> Lambda: 0.025376 LR test value: 57.924 p-value: 2.72e-14
>
> Log likelihood: -261.4561
> ML residual variance (sigma squared): 0.15865, (sigma: 0.39831)
> Number of observations: 516
> Number of parameters estimated: 6
> AIC: 534.91
>
> In this model, the independent variable was the presence/absence of a 
> bat species in urban environment (group:0/1). Two continuous explanatory

The CAR model fitted by spautolm is only for Gaussian response variables, 
but your response is discrete taking only two values. Consider using the 
CARBayes (provides CAR implementations for binomial response) or 
spatialprobit (SAR model, semprobit()) packages to fit this model, or a 
GLMM estimator using a continuous space approach to spatial dependence. 
You may also be able to use inla() in the INLA package, from 
www.r-inla.org.

Hope this clarifies,

Roger

> variables were street intersection density (intersect, # of street 
> intersections per area, range 0-10) and human population density (# of 
> people per area, range 100-15000). I modeled these two variables as well 
> as the interaction between them. From the result, both variables were 
> significant positive variables. But the interaction term is 
> significantly negative. Basically, when the population density 
> increases, the positive effect of intersection density will decrease (or 
> vice versa). As far as I understand, there should be a threshold for 
> each variable. After passing the threshold, the positive effect of a 
> variable would turn into a negative effect due to the interaction with 
> the other variable.
>
> My biggest question is (assuming my knowledge by far is correct) how to find out this threshold.
> If this is a linear model, like z=a+b*x+c*y+m*x*y, I can calculate the thresholds for x as -m/c. The threshold for y is -m/b.
> Can I apply these calculations to the coefficients in CAR model?
>
> Another idea I had was to calculate the prediction value from CAR model and plot the prediction in a 3-D graph. So the threshold can be seen. But I read that it is not possible to get the prediction values from CAR model.
>
> If anyone can suggest a way to either calculate the threshold or visually present the threshold in the prediction or just provide any thoughts/comments, thank you in advance.
>
> Han
>
> Han Li
> Department of Biology
> Baylor University
> Waco, TX  76798-7388
> Phone: (254) 710-2151
> Fax: (254) 710-2969
> han_li at baylor.edu<mailto:han_li at baylor.edu>
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, NHH Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no



More information about the R-sig-Geo mailing list