Learn R Programming

xpose4 (version 4.5.3)

gam.functions: GAM functions for Xpose 4

Description

These are functions for running the generalized additive model within Xpose 4, summarizing its results, and plotting them.

Usage

xp.gam(object,
       parnam=xvardef("parms", object),
       covnams = xvardef("covariates", object),
       wts.col=NULL,
       ask.for.input=TRUE,
       overwrite=TRUE, 
       ...)

check.gamobj()

xp.akaike.plot(title = NULL, xlb = "Akaike value", ylb = "Models", gamobj=NULL, ...) xp.check.scope(object, covnam = xvardef("covariates", object), nmods = object@Prefs@Gam.prefs$nmods, smoother1 = object@Prefs@Gam.prefs$smoother1, smoother2 = object@Prefs@Gam.prefs$smoother2, smoother3 = object@Prefs@Gam.prefs$smoother3, smoother4 = object@Prefs@Gam.prefs$smoother4, arg1 = object@Prefs@Gam.prefs$arg1, arg2 = object@Prefs@Gam.prefs$arg2, arg3 = object@Prefs@Gam.prefs$arg3, arg4 = object@Prefs@Gam.prefs$arg4, excl1 = object@Prefs@Gam.prefs$excl1, excl2 = object@Prefs@Gam.prefs$excl2, excl3 = object@Prefs@Gam.prefs$excl3, excl4 = object@Prefs@Gam.prefs$excl4, extra = object@Prefs@Gam.prefs$extra, ...)

xp.cook(gam.object) xp.ind.inf.fit(plot.ids = TRUE, idscex = 0.7, ptscex = 0.7, title = NULL, recur = FALSE, xlb = NULL, ylb = NULL, gamobj=NULL, ...) xp.ind.inf.terms(xlb = NULL, ylb = NULL, plot.ids = TRUE, idscex = 0.7, ptscex = 0.7, prompt = TRUE, gamobj=NULL, ...) xp.ind.stud.res(title = NULL, recur = FALSE, xlb = NULL, ylb = NULL, gamobj=NULL) xp.plot(plot.ids = TRUE, idscex = 0.7, ptscex = 0.7, prompt = TRUE, gamobj=NULL, ...) xp.summary(gamobj=NULL)

Arguments

object

An xpose.data object.

title

A text string indicating plot title. If NULL, left blank.

xlb

A text string indicating x-axis legend. If NULL, left blank.

ylb

A text string indicating y-axis legend. If NULL, left blank.

covnam

A list of covariate variables to use in the GAM search.

wts.col

Column in the object@Data.firstonly to use as weights on the parnam values.

nmods

The number of modelfits to use when setting GAM scope. The default is 3.

smoother1

Smoother for each model.

smoother2

Smoother for each model.

smoother3

Smoother for each model.

smoother4

Smoother for each model.

arg1

Argument for model 1.

arg2

Argument for model 2.

arg3

Argument for model 3.

arg4

Argument for model 4.

excl1

Covariate exclusion from model 1.

excl2

Covariate exclusion from model 2.

excl3

Covariate exclusion from model 3.

excl4

Covariate exclusion from model 4.

extra

Scope parameter for the GAM.

gam.object

A GAM object (see gam.

plot.ids

Logical, specifies whether or not ID numbers should be displayed.

idscex

ID label size.

ptscex

Point size.

recur

If dispersion should be used in the GAM object.

prompt

Specifies whether or not the user should be prompted to press RETURN between plot pages. Default is TRUE.

parnam

The parameter to run the GAM on.

covnams

The covariates to test on the parnam

ask.for.input

Should the program ask for input from the user? Can be TRUE or FALSE.

overwrite

Should we overwrite the gam object stored in memory if it exists already. Can be TRUE or FALSE.

gamobj

A GAM object to use in the plot. IF null then the user is asked to choose from a list of GAM objects in memory.

Other arguments passed to the GAM functions.

Value

A GAM fit.

Details

Forthcoming.

See Also

gam, dotplot

Examples

Run this code

## We expect to find the required NONMEM run and table files for run
## 5 in the current working directory
xpdb <- xpose.data(5)

## Run a GAM
xp.gam(xpdb)

## Summarize GAM
xp.summary()

## An Akaike plot of the results
xp.akaike.plot()

## Studentized residuals
xp.ind.stud.res()

## Individual influence on GAM fit
xp.ind.inf.fit(plot.ids=xpdb@Prefs@Gam.prefs$plot.ids)

## Individual influence on GAM terms
xp.ind.inf.terms(plot.ids=xpdb@Prefs@Gam.prefs$plot.ids)

Run the code above in your browser using DataLab