[R-sig-Geo] Offset for spautolm function in Spatialreg package

Kaushi Kanankege k@n@n009 @end|ng |rom umn@edu
Sun Nov 22 19:25:05 CET 2020


 Dear members of the R-sig-Geo,
Is there a way to set an 'offset' when running a Poisson regression using
the spautolm function offered in the Spatialreg package?

I have count data of disease at administrative levels and I am trying to
use CAR model to account for the spatial dependence between the admin
levels. I would appreciate suggestions of setting the offset (the log of a
total number of animals in each admin level) or ways to work around this
using spautolm function.

Thank you very much.

Kaushi

Further details below:

# Unit of analysis is ‘Districts’ i.e. administrative divisions

# Count_disease = number of animals with the disease

# Var 1 and 2 are selected independent variables

# We have the count of animals per each district and I am trying to set
this as the ‘offset’



 # The same model was run as a zero inflated Poisson regression using the
following

offset = log(Ani_pop)

ZIP.D <- zeroinfl(formula_Red, data = Data, dist = "poisson", EM = TRUE,
link = "logit", offset = offset)



 #Formula

formula <-  Count_disease ~  Variable 1 + Variable2

 # CAR fit

CAR.D <- spautolm(formula_Red, data= Thai.D.shp2, listw=ThaiD.listw,
family="CAR",zero.policy = TRUE, method="eigen")



How to set the offset?

Or suggestions to work around this?



-- 

Kaushi Kanankege (DVM, MS, PhD)
Postdoctoral Associate
Center for Animal Health and Food Safety
University of Minnesota Twin Cities
kanan009 using umn.edu,;+1 848-480-9250;
linkedin.com/in/kaushi-kanankege
<https://www.linkedin.com/in/kaushi-kanankege>

	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list