Hello fellow R users,

 

I would need your help on GAM/GAMM models and interpolation on a marked
spatial point process  (cases and controls).

I  use the mgcv package to fit a GAMM model with a binary outcome, a
parametric part (var1+..+varn), a spline used for the spatial variation, and
a random effect coded through another spline in this form:

 

gam(outcome~var1+.+varn+s(xlong+ylat)+s(var, bs="re"), data=MyData,
family=binomial(link=logit))

 

My purpose is to calculate a risk map adjusted on my covariates to look for
compare and look for obvious differences with a risk map calculated by
kernel ratio.

However...the big deal is to interpolate my model to estimate the risk over
the area of interest, but of course I don't have measurements of the
variables (except geographic coordinates) for the whole area: only for the
individuals in the dataset.

 

I am kind of lost...I have been searching for a couple of days now and I
tried the predict.gam function with the easy type="response" and the more
mysterious type="lpmatrix", and other possibilities but cannot find what I
am looking for. I only calculate the risk for my individuals. I thought that
the non-parametric spline component of the GAM/GAMM models could have helped
me interpolate and "fill the gaps".

 

Did I miss something big? Are there solutions (without headache) or magical
package I missed?

 

Thank you for any help you could bring !

 

Alex


	[[alternative HTML version deleted]]

