Copyright (C) 1999, 2000, 2001  Jose C. Pinheiro and Douglas M. Bates

Installation of NLME under S-PLUS 6.0

Version 3.3.1 - September 2001

Authors: Jose Pinheiro, Bell Labs, Lucent Technologies
         Douglas Bates, Dept. of Statistics, U. of Wisconsin - Madison

Port of NLME 3.x to S-PLUS 6.0 done with the help of Saikat DebRoy,
Dept. of Statistics, U. of Wisconsin.


1) Expand the tar file.

If you are using the GNU version of tar, you can use

 % tar zxf nlme_SP6_3_3_1.tar.gz  

otherwise, use

 % gunzip -d -c nlme_SP6_3_3_1.tar.gz | tar xf    

(To distinguish commands to the shell from S-PLUS commands we will use
"%" as the shell prompt and ">" as the S-PLUS prompt. We use the
standard name "Splus6" to refer to the S-PLUS 6.0 script.)

You have probably already done this if you are reading this file.
Expanding the tar file creates three directories, NLME, NLMEDATA, and
SAS_Mixed, with subdirectories SAS_Mixed/data, and
SAS_Mixed/transcripts. The S source, the S data for tests, and the C
source files are in the directory NLME.  This documentation is also in
the directory NLME.  The help files have not changed since release 3.3
(the one included with S-PLUS 6.0) and are not included here.  The
NLMEDATA directory contains data sets that illustrate the use of the
functions and methods available in the NLME directory. The SAS_Mixed
directory some of the data sets from the book "SAS System for Mixed
Models" by Littell, Milliken, Stroup, and Wolfinger (1996) SAS
Institute and a PDF file, Usinglme.pdf, with the paper "lme for SAS
PROC MIXED Users" describing how the data sets can be analyzed using
the lme function. If you wish to make the nlme code part of your
standard version of S-PLUS, you should expand the tar file in the
directory $SHOME/library where $SHOME stands for the home directory
for S-PLUS.  You can determine the value of $SHOME by

 % Splus6 SHOME

2)  Install the code in the NLME directory

First, cd to that directory and create the file "makefile" with the
shell command 

 % Splus6 CHAPTER 

NOTE: the C code has not changed since version 3.3, which is the one
included with S-PLUS 6.0; it is included with the rest of the
distribution for reference only. If the nlmefit.c file is present in
the NLME directory, compilation instructions will be included in
makefile and it will be compiled in the step below. You may consider
moving it to another directory or changing its extension to something
other than ".c", before producing the makefile.

Initialize the S chapter and install the S source code with

 % Splus6 make 

You will see several warning messages of conflicting definitions of
functions, because of the previous version of NLME included with
S-PLUS 6.0; these can be ignored (see the note at the end of this
file).

3) Test the installation by sourcing the file "tests" within an S-PLUS
session started from the NLME directory.
 
 > options(conflicts.ok = T)
 > source("tests")

If the tests run properly, there should be no output before a new
prompt from S-PLUS. (The call to options(conflicts.ok = T) is used to
prevent warning messages about conflicting definitions of functions.) 

4) Using the functions in the NLME chapter 

After the NLME S chapter has been created, you can:

 - start S-PLUS 6.0 from within the NLME directory, in which case all 
   functions in NLME 3.3.1 will be automatically available.

 - attach the NLME S chapter to an S-PLUS session started in another
   directory, using

   > attach("NLME directory path")

   with the appropriate path of the NLME directory being provided.

 - attach the NLME S chapter as a library. If the NLME directory has
   been installed in $SHOME/library, you should use

   > library(NLME, first = T)

   (The first = T is required, as older versions of NLME functions are
   included in the "nlme3" library.) If NLME has been installed in
   another directory, say "mydir", you should use

   > library(NLME, first = T, lib.loc = "mydir")

5) User's guide and help files 

A user's guide is available in the PDF file U_Guide.pdf in the
NLME directory. It contains examples of the use of the code. The
PDF file HelpFunc.pdf in the NLME directory contains copies of
all the help files available in NLME/.Data/.Help. The PDF file
HelpData.pdf in the NLMEDATA directory contains descriptions of the
data sets included in that directory.

NOTE: Because an older version of NLME is included with S-PLUS 6.0,
warnings messages about conflicting definitions of functions on
databases ".Data" and "nlme3" will be printed when functions in NLME
3.3.1 are used. To prevent the warning messages from being printed,
you can set

 > options(conflicts.ok = T)



