nl: Functions to fit nonlinear additive models in GAMLSS

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

The function nl.obs generate a nonlinear object which can be used to fit a nonlinear additive model within the gamlss algorithm. The function nl takes the nonlinear object created by nl.obs and returns it with several attributes which are used in the function gamlss.nl() which is doing the actual fitting within the backfitting function additive.fit. The actual fit is done by the R function nlm. The function gamlss.nl() is never used on its own).

Usage

1
2
3
nl.obj(formula, start, data)
nl(obj)
gamlss.nl(x, y, w,  xeval = NULL)

Arguments

formula

a non linear formula or function

start

starting values for the parameters in the formula

data

data where the formula can be interpreted

obj

a non linear object created by nl.obj

x

the nl object from nl

y

iterative y variable

w

iterative weights

xeval

used in prediction if implemented

Details

The function gamlss.nl() is an internal function of GAMLSS allowing the use of the nlm function to be used within the backfitting cycle of gamlss, and should be not used on its own.

Value

The function nl.obs returns a non linear object by using the Jim Lindsey's function finterp found in the R package rmutil.

The function nl returns a vector with values zero to be included in the design matrix but with attributes useful in the fitting the non linear model.

Author(s)

Mikis Stasinopoulos d.stasinopoulos@londonmet.ac.uk, Bob Rigby b.rigby@londonmet.ac.uk

References

http://popgen.unimaas.nl/~jlindsey/index.html: Jim Lindsey web page

Rigby, R. A. and Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), Appl. Statist., 54, part 3, pp 507-554.

Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2003) Instructions on how to use the GAMLSS package in R. Accompanying documentation in the current GAMLSS help files, (see also http://www.gamlss.com/).

See Also

nlgamlss

Examples

1
2
3
data(la)
nlo<-nl.obj(formula=~bflow*(1-(1-exp(p1))*exp(-p2/bflow)), start=c(-.9, 90), data=la)
mod1<-gamlss(PET60~nl(nlo)-1, data=la ) 

Example output

Loading required package: gamlss
Loading required package: splines
Loading required package: gamlss.data
Loading required package: gamlss.dist
Loading required package: MASS
Loading required package: nlme
Loading required package: parallel
 **********   GAMLSS Version 5.1-2  ********** 
For more on GAMLSS look at http://www.gamlss.org/
Type gamlssNews() to see new features/changes/bug fixes.

Loading required package: survival
GAMLSS-RS iteration 1: Global Deviance = 2278.682 
GAMLSS-RS iteration 2: Global Deviance = 2278.682 

gamlss.nl documentation built on May 2, 2019, 5:24 p.m.

Related to nl in gamlss.nl...