hunua | R Documentation |
The hunua
data frame has 392 rows and 18 columns.
Altitude is explanatory, and there are binary responses
(presence/absence = 1/0 respectively) for 17 plant species.
data(hunua)
This data frame contains the following columns:
Agathis australis, or Kauri
Beilschmiedia tawa, or Tawa
Corynocarpus laevigatus
Cyathea dealbata
Cyathea medullaris
Dacrydium cupressinum
Dacrycarpus dacrydioides
Elaecarpus dentatus
Hedycarya arborea
Species name unknown
Knightia excelsa, or Rewarewa
Kunzea ericoides
Leptospermum scoparium
Metrosideros robusta
Nestegis lanceolata
Rhopalostylis sapida
Vitex lucens, or Puriri
meters above sea level
These were collected from the Hunua Ranges, a small forest in southern
Auckland, New Zealand. At 392 sites in the forest, the presence/absence
of 17 plant species was recorded, as well as the altitude.
Each site was of area size 200m^2
.
Dr Neil Mitchell, University of Auckland.
waitakere
.
# Fit a GAM using vgam() and compare it with the Waitakere Ranges one
fit.h <- vgam(agaaus ~ s(altitude, df = 2), binomialff, data = hunua)
## Not run:
plot(fit.h, se = TRUE, lcol = "orange", scol = "orange",
llwd = 2, slwd = 2, main = "Orange is Hunua, Blue is Waitakere")
## End(Not run)
head(predict(fit.h, hunua, type = "response"))
fit.w <- vgam(agaaus ~ s(altitude, df = 2), binomialff, data = waitakere)
## Not run:
plot(fit.w, se = TRUE, lcol = "blue", scol = "blue", add = TRUE)
## End(Not run)
head(predict(fit.w, hunua, type = "response")) # Same as above?
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.