Given that this is just s(x2) - s(x1) then you can get the CI using the
type= "lpmatrix" with predict.gam. Here's an example...
library(mgcv)
## simulate some data
dat <- gamSim(1,n=400,dist="poisson",scale=.25)
## fit log-linear model...
b <- gam(y~s(x0)+s(x1)+s(x2)+s(x3),family=poisson,
Dear R-Users,
Dr. Wood replied to a similar topic before where confidence intervals were
for a ratio of two treatments (
https://stat.ethz.ch/pipermail/r-help/2011-June/282190.html). But my
question is more complicated than that one. In my case, log(E(y)) = s(x)
where y is a smooth function of x.
2 matches
Mail list logo