Skip to content

Select distribution and link in GAM

4 messages · ARISTIDES LOPEZ, Gavin Simpson

#
On Mon, 2011-04-11 at 11:18 -0500, ARISTIDES LOPEZ wrote:
You *did* read ?gam, yes?
family: This is a family object specifying the distribution and link
          to use in fitting etc. See ?glm? and ?family? for more
          details. A negative binomial family is provided: see
          ?negbin?.

And that points us to ?glm and ?family, so from ?glm:

  family: a description of the error distribution and link function to
          be used in the model. This can be a character string naming a
          family function, a family function or the result of a call to
          a family function.  (See ?family? for details of family
          functions.)

which also tells us to look at ?family for details, so we do, and we
find all the information we need.

Even a look at the examples for gam() in ?gam would have shown you what
was involved.

Or did you mean something else by "select"? In which case, I think you
should think about what form the response takes: it is continuous but
bound above zero as you can't have a zero length fish. In other words
the response is strictly positive and continuous. A Gamma GLM would seem
to be an appropriate starting point in that case.

HTH

G
#
On Mon, 2011-04-11 at 16:02 -0500, ARISTIDES LOPEZ wrote:
You need to learn more about GLMs. You choose the error distribution on
the basis of what type of response and therefore errors you have.

Poisson and Bionomial are for discrete data, and length is *not*
discrete, so these would seem inappropriate. As I mentioned in my last
message, a Gamma GLM/GAM would be a reasonable starting point as your
response variable, length, is continuous and strictly positive (you
can't have a zero length fish).

G