# we do not have any lecture this week since we spend class time this week working on the homework.
# I decied to go though some of the element while we do poisson regression.Poisson Regression involves regression models in which the response variable is in the form of counts and not fractional numbers. For example, the count of number of births or number of wins in a football match series. Also the values of the response variables follow a Poisson distribution. Much like linear least squares regression (LLSR), using Poisson regression to make inferences requires model assumptions.
# Poisson Response The response variable is a count per unit of time or space, described by a Poisson distribution.
# Histogram prpbably the easiest way to define whether we should use Poisson regression or not
# Independence The observations must be independent of one another.
# Mean=Variance By definition, the mean of a Poisson random variable must be equal to its variance.
# Linearity The log of the mean rate, log( λ), must be a linear function of x.
# This is an example how to interpret
# An increase of 1km^2 in an islands area is associated with a decresea of .0005799 in the log mean number of species on that island, holding elevation constant
# An increase of 1km^2 in an islands area is associated with a multiplicative change of .9994212 in the mean number of species on that island, holding elevation constant
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.