ziplss
is used with gam
to fit 2 stage zero inflated Poisson models. gam
is called with
a list containing 2 formulae, the first specifies the response on the left hand side and the structure of the linear predictor for the Poisson parameter on the right hand side. The second is one sided, specifying the linear predictor for the probability of presence on the right hand side.
The fitted values for this family will be a two column matrix. The first column is the log of the Poisson parameter,
and the second column is the complementary log log of probability of presence..
Predictions using predict.gam
will also produce 2 column matrices for type
"link"
and "response"
.
The null deviance computed for this model assumes that a single probability of presence and a single Poisson parameter
are estimated.
For data with large areas of covariate space over which the response is zero it may be advisable to use low order penalties to
avoid problems. For 1D smooths uses e.g. s(x,m=1)
and for isotropic smooths use Duchon.spline
s in place of thin plaste terms with order 1 penalties, e.g s(x,z,m=c(1,.5))
--- such smooths penalize towards constants, thereby avoiding extreme estimates when the data are uninformative.
zipll
is a function used by ziplss
, exported only to allow external use of the ziplss
family. It is not usually called directly.