Instructions for using the GAM functions in R

Colour coding:
                              # comments
                              > user commands


1) EITHER: Download the tar file R.all.tar.
To untar the file under UNIX/LINUX, type at the UNIX/LINUX prompt:

       tar -xvf R.all.tar

(this creates the directory "Rgamcode" containing all the code and data).

ALTERNATIVELY: download each function one by one into the desired directory.
This will work under any platform.

2) Start R from working directory Rgamcode.

Type

       >source("startup.func")

       > startup.func()

This reads all relevant functions into R.

Read in the example data set with:

       > cb <- read.table("cb", header=T)

All objects can now be removed from the working directory if required.

3) Demonstration analysis on the data set cb.

Enter the following commands:

       > library(mgcv)     # (needed every session to attach the mgcv library)

# If you get an error, read the instructions here about installing the library mgcv.

       > indcb <- indsp.func(cb, c(4, 7, 10, 15, 20, 33))     # (calculates index curve for a variety of df)

       > cb.bootind.119.10 <- outer.boot.func(cb, 10, 119, "cb.bootind.119.10")
       > # (this is the bootstrapping: might take a minute or two for 119 replicates)

       > sp.plot("cb", 10, cb.bootind.119.10, 1, 6, 1, conf=0.95)

The other functions were all used invisibly in the demonstration.


Last updated:  24th June 2002