In the 'isolation.txt'data set,the response variable is called incidence;a value of1means that an island was occupied by a particular species of bird,and0means that the bird did not breed there.The...

1 answer below »



  • In the 'isolation.txt'data set,the response variable is called incidence;a value of1means that an island was occupied by a particular species of bird,and0means that the bird did not breed there.The explanatory variables are the area of the island(km2)and the isolation of the island(distance from the mainland,km). Apply ageneralisedadditive model (GAM) with appropriate error distribution. Specify a smoothing function (s(...)) for each of the two continuous explanatory variables. Check whether both smoothing functions are warranted and simplify your model if required. Plot the data as is (i.e. simply as 0s and 1s) and add your model fit incl. 95%confidenceintervals. Finally, compare the GAM results to those of a GLM (with the same error distribution).


    Note that you need to use the read.table() function with the argument header = T, to read in the data.






incidenceareaisolation 17.9283.317 01.9257.554 12.0455.883 04.7815.932 01.5365.308 17.3694.934 18.5992.882 02.4228.771 16.4036.092 17.1996.977 02.6547.748 14.1284.297 04.1758.516 17.0983.318 02.3929.292 18.695.923 14.6674.997 12.3072.434 11.0536.842 00.6576.452 15.6322.506 15.8956.613 04.8559.577 18.2416.33 12.8986.649 14.4455.032 16.0272.023 01.5745.737 02.75.762 03.1066.924 04.337.262 17.7993.219 04.639.229 16.9515.841 00.8599.294 13.6572.759 02.6968.342 04.1718.805 18.0632.274 00.1535.65 11.9485.447 12.0065.48 16.5084.007 11.5015.4 19.2695.272 14.174.786 03.3765.219 02.2287.99 01.8018.466 16.4413.451
Answered Same DayMay 03, 2021

Answer To: In the 'isolation.txt'data set,the response variable is called incidence;a value of1means that an...

Pooja answered on May 12 2021
146 Votes
x<-1
library(readxl)
data1<-read_excel(path="C:/Users/HP/Desktop/Book2.xlsx")
library(mgcv)
b <-
gam(incidence~s(area)+s(isolation),data=data1)
summary(b)
plot(b,pages=1,residuals=TRUE)
plot(b,pages=1,seWithMean=TRUE)
fit <-...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here