File: mackgam.q

package info (click to toggle)
sm 2.2-6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,540 kB
  • sloc: f90: 259; ansic: 21; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 507 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
library(gam)
model1  <- gam(log(Density) ~ lo(log(mack.depth)) + lo(Temperature)
            + lo(mack.lat, mack.long), data = mackerel)
print(model1)
print(gam(log(Density) ~ lo(Temperature) + lo(mack.lat, mack.long),
            data = mackerel))
print(gam(log(Density) ~ lo(log(mack.depth))  + lo(mack.lat, mack.long),
            data = mackerel))
print(gam(log(Density) ~ lo(log(mack.depth))  + lo(Temperature),
            data = mackerel))
par(mfrow=c(2,2))
plot(model1, se = TRUE)
par(mfrow=c(1,1))