Dear list,

In the R package spatstat (I am using the current version, 1.31-0) , there is an option use.gam. When you set this to true, you can include smooth terms in the linear predictor, the same way you do with the R package mgcv. For example,
library(spatstat)
g <- ppm(nztrees, ~1+s(x,y), use.gam=TRUE)
Where s(x,y) is a semi-parametrically estimated function of the coordinates. Now, if I want a confidence interval for the intercept (or other linear terms, for example, if there were other predictors in the model), you can usually use summary or vcov, which works when you don't use gam but fails when you do use gam
vcov(g)
which gives the error message
Error in model.frame.default(formula = fmla, data =
    list(.mpl.W = c(7.09716796875,  :invalid type (list) for variable 's(x, y)'
I am aware that this standard error approximation here is not justified when you use gam, but this is captured by the warning message:
In addition: Warning message: model was fitted by gam();
            asymptotic variance calculation ignores this
I'm not concerned about this - I am prepared to justify the use of these standard errors for the purpose I'm using them.
The error message I got above does not seem to depend on the data set I'm using. I used the nztrees example here because I know it comes pre-loaded with spatstat. It seems like it's complaining about the variable itself (possibly looking for the variable s(x,y) in the workspace somewhere?), but the model clearly understands the syntax on some level since it fits the model (and the predicted values, for my own dataset, look quite good, so I know it's not just pumping out garbage).
Does anybody have any tips or insights about this? Is this a bug? To my surprise, I've been unable to find any discussion of this online. Any help or hints are appreciated. Thanks very much,

Jason G.

**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues 

	[[alternative HTML version deleted]]

